Author Topic: Linux, vim, and the Poker's escape/tilde combination  (Read 23741 times)

0 Members and 1 Guest are viewing this topic.

Offline Djuzuh

  • Posts: 1127
Linux, vim, and the Poker's escape/tilde combination
« Reply #50 on: Mon, 30 April 2012, 17:15:11 »
Sucks.

In azerty, your tilde key is used to produce ˛, and in bépo it produces $.

So I guess I have no problem, unless I do PHP.

Offline mSSM

  • Posts: 50
Linux, vim, and the Poker's escape/tilde combination
« Reply #51 on: Mon, 30 April 2012, 19:03:05 »
People should whine less about the escape/tilde problem, to be honest. Just make it behave similar to the HHKB. Add this to your .xmodmaprc (if you are on Linux system or something similar using X11):
Code: [Select]
clear Lock
clear Control
add Control = Caps_Lock
keysym Control_L = Escape

What this does is:
+ Remove any keys acting as Lock (CapsLock) modifiers
+ Remove any keys acting as Control modifiers (this also kills Control_R, but who needs that anyhow??)
+ Make the Caps_Lock key like a Control modifier
+ Make Control_L behave like Escape

The placement of the CTRL modifier now mimicks the HHKBs layout. The difference is that instead of Esc (on the HHKB) we have a tilda/backtick, and that Esc is located where on normal layouts Control Left would be (on an HHKB, there is nothing).

I really really like this layout, because it allows me to press Esc with the edge of my hand (or rather, with that part of my hand, where my little finger's knuckle and my hand's edge intersect). This makes for a way nicer and faster movement than having to move your finger all the way to the top left just to press Esc. :)

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Thread Starter
  • Posts: 5057
  • Location: SF Bae Area
Linux, vim, and the Poker's escape/tilde combination
« Reply #52 on: Mon, 30 April 2012, 19:06:27 »
I ended up with Esc in the top left, caps lock mapped to Win (for xmonad, my window manager), and tilde on the menu key.  Worked really well for me.

Offline mSSM

  • Posts: 50
Linux, vim, and the Poker's escape/tilde combination
« Reply #53 on: Mon, 30 April 2012, 19:10:55 »
So you basically ended uphaving 3 Win Keys? :D

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Thread Starter
  • Posts: 5057
  • Location: SF Bae Area
Linux, vim, and the Poker's escape/tilde combination
« Reply #54 on: Mon, 30 April 2012, 20:22:04 »
Quote from: mSSM;586797
So you basically ended uphaving 3 Win Keys? :D

Yes, on the Poker.  I use winkeyless keyboards as well.

Offline rknize

  • * Administrator
  • Posts: 1731
  • Location: Chicago
    • metaruss
Linux, vim, and the Poker's escape/tilde combination
« Reply #55 on: Mon, 30 April 2012, 20:33:00 »
I hadn't considered moving tilde.  The problem is that I tend to jump around between machines, so I don't like doing elaborate key remappings.  Sometimes I am on a text console, too.
Russ

Offline Squelos

  • Posts: 153
Linux, vim, and the Poker's escape/tilde combination
« Reply #56 on: Tue, 01 May 2012, 06:56:20 »
^ this

Going standard is never bad

Offline urbanus

  • Posts: 110
  • Location: Sydney, Australia
Linux, vim, and the Poker's escape/tilde combination
« Reply #57 on: Wed, 02 May 2012, 05:42:50 »
Quote from: hashbaz;423653
I want escape to be a single keystroke because vim is my text editor of choice.


I rarely use ESC in Vim -- I use CTRL+[, which is equivalent.

I got into the habit because it allows me to change modes without my hands leaving the main part of the keyboard.

Offline sprk

  • Posts: 21
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #58 on: Mon, 30 December 2013, 19:16:10 »
Sorry for the necro post but I thought I'd offer my input on this matter for someone that might be looking for another way to get their escape on - on a poker ii...

Remap esc to jj or jk in insert mode. That way you don't even have to leave starting position to leave insert mode.

Code: [Select]

:inoremap jj <Esc>


Offline daerid

  • Posts: 4276
  • Location: Denver, CO
    • Rossipedia
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #59 on: Tue, 31 December 2013, 11:58:41 »
I absolutely cannot do that, for the same reason that I can't use the SpaceFN layout: if there's any lag whatsoever in a key press it annoys the ever living **** out of me to the point I want to throw my keyboard out the window.

Currently my [ key is located on the left side of my 'dox, so hitting Ctrl+[ is a one handed deal (might be different if I were working in Vim all day instead of Visual Studio *grumble*).

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Thread Starter
  • Posts: 5057
  • Location: SF Bae Area
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #60 on: Wed, 01 January 2014, 23:33:16 »
I absolutely cannot do that, for the same reason that I can't use the SpaceFN layout: if there's any lag whatsoever in a key press it annoys the ever living **** out of me to the point I want to throw my keyboard out the window.

Currently my [ key is located on the left side of my 'dox, so hitting Ctrl+[ is a one handed deal (might be different if I were working in Vim all day instead of Visual Studio *grumble*).

This ^^

Response time is crucial for oneness with editor modal.

Offline sprk

  • Posts: 21
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #61 on: Thu, 02 January 2014, 00:14:56 »
This ^^

Response time is crucial for oneness with editor modal.

I just tested remaping jj to <Esc> in vim. It's immediate, no lag whatsoever.

Offline daerid

  • Posts: 4276
  • Location: Denver, CO
    • Rossipedia
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #62 on: Thu, 02 January 2014, 01:12:16 »
This ^^

Response time is crucial for oneness with editor modal.

I just tested remaping jj to <Esc> in vim. It's immediate, no lag whatsoever.

You're right. But that still excludes using 'jj' in insert mode. Granted, I'll probably never need to actually write 'jj', but still...

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #63 on: Thu, 02 January 2014, 05:42:55 »
I absolutely cannot do that, for the same reason that I can't use the SpaceFN layout: if there's any lag whatsoever in a key press it annoys the ever living **** out of me to the point I want to throw my keyboard out the window.

Currently my [ key is located on the left side of my 'dox, so hitting Ctrl+[ is a one handed deal (might be different if I were working in Vim all day instead of Visual Studio *grumble*).

Are you talking about the fact that with SpaceFN the space key generates its character when it is released?

Offline sprk

  • Posts: 21
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #64 on: Thu, 02 January 2014, 19:02:34 »
You're right. But that still excludes using 'jj' in insert mode. Granted, I'll probably never need to actually write 'jj', but still...

Ahhh yes, this is also one of the main reasons it didn't stick for me to be honest. The moment I knew I'd have to not type the unseemly combination, I started making typos just because of that. That being said, I tend to indoctrinate everyone that allows me to in the world of vim, and some of the people I've converted swear by that remap.

Offline osi

  • Posts: 964
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #65 on: Wed, 12 March 2014, 14:55:38 »
My poker stays at home as it is used primarily for gaming while I keep the hhkb at the job.

Last night I had to get a little work done at the house.

The work got squared away but oh boy, was it a chore. I've never done this amount of work on the poker before and I probably won't again.

My fingers and brain are well accustomed to the hhkb layout and for me, is proven to have the superior layout--especially for editing in vim and also general use.

Today is when I start my fund for a second hhkb.

Offline daerid

  • Posts: 4276
  • Location: Denver, CO
    • Rossipedia
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #66 on: Wed, 12 March 2014, 15:28:42 »
I absolutely cannot do that, for the same reason that I can't use the SpaceFN layout: if there's any lag whatsoever in a key press it annoys the ever living **** out of me to the point I want to throw my keyboard out the window.

Currently my [ key is located on the left side of my 'dox, so hitting Ctrl+[ is a one handed deal (might be different if I were working in Vim all day instead of Visual Studio *grumble*).

Are you talking about the fact that with SpaceFN the space key generates its character when it is released?

Yup. I tried it a while ago (or something very similar).


Offline abtrout

  • Posts: 58
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #67 on: Wed, 12 March 2014, 15:59:41 »
It should be possible to remap shift+esc to ~, why not just do that?

That's a great idea. Not sure why I hadn't thought of that yet  :thumb:

Offline abtrout

  • Posts: 58
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #68 on: Wed, 12 March 2014, 16:00:43 »
That's a great idea. Not sure why I hadn't thought of that yet  :thumb:

CUZ UR A DUMMY.

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Thread Starter
  • Posts: 5057
  • Location: SF Bae Area
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #69 on: Wed, 12 March 2014, 16:04:47 »
It should be possible to remap shift+esc to ~, why not just do that?

That's a great idea. Not sure why I hadn't thought of that yet  :thumb:

Did you see my objections to that approach a few posts down? :)

Offline abtrout

  • Posts: 58
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #70 on: Wed, 12 March 2014, 16:12:56 »
Just did. I understand that would be a problem for simply remapping shift+esc to ~ at a software level. But is such a thing not a problem at a hardware level? If you were to program the key combination on your keyboard controller?

EDIT: i realize that may not be relevant for your original post, I just meant that was an interesting solution to 60% escape/tilde cramp.
« Last Edit: Wed, 12 March 2014, 16:19:20 by abtrout »

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Thread Starter
  • Posts: 5057
  • Location: SF Bae Area
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #71 on: Wed, 12 March 2014, 16:19:38 »
We are talking about the Poker though.  Non-programmable.

edit: ah :)

Offline rknize

  • * Administrator
  • Posts: 1731
  • Location: Chicago
    • metaruss
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #72 on: Wed, 26 March 2014, 17:35:08 »
The way the FC660 overloads that key is perfect.  Cmon GH60.
Russ

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #73 on: Fri, 28 March 2014, 04:44:19 »
In Vim, Ctrl-C is equivalent to Esc. Not always true of vi though (depends on whether the system you are using uses Vim in compatibility mode, or something like nvi)

Offline hjkl_over_wasd

  • Posts: 67
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #74 on: Sat, 19 April 2014, 21:46:07 »
I'm waiting for my Poker II to arrive in the mail and meanwhile I was checking this very problem. This is my solution:

I want to have both esc and ctrl accessible through caps-lock, which frees up the esc key for `/~

This is how I do it:

Code: [Select]
xmodmap -e "keycode 9 = grave asciitilde"
xmodmap -e "keycode 49 = Escape"

Meanwhile, I have set that x-setting that makes your caps into a ctrl, without changing the keycode for the caps-lock.

The brilliant part is using a piece of software called xcape which runs completely in user space and I run it like so:
Code: [Select]
xcape -e 'Caps_Lock=Escape;Super_L=Alt_L|F2'
Now my caps key is esc when pressed and released while it translates to a ctrl keysym when held down together with another key. I have also mapped the left windows key to alt-f2, since this triggers the Krunner in KDE.

I think I'm really going to like xcape even more than I already am, when I start using my Poker II.
« Last Edit: Sun, 20 April 2014, 06:43:11 by hjkl_over_wasd »

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #75 on: Sun, 20 April 2014, 16:37:52 »
Easy solution: Buy an original KBT Pure. Dedicated Esc key, dedicated Tilde key (even though it's in a rather odd spot). ;) Otherwise standard ANSI layout except for the short right shift. I find the Fn layout works well. I have mapped the left hand Winkey to Fn also (using DIP switch 4) and use right shift more than left.
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline ajx

  • Posts: 391
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #76 on: Tue, 22 April 2014, 07:23:01 »
In my Poker II, you can remap tilde key to the right ctrl which often unusually not used by users
But indeed about above post, KBT Pure solved that issue with dedicated key and its layout is much more natural than others 60% size

Offline p3lim

  • Posts: 106
  • Location: Norway
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #77 on: Tue, 22 April 2014, 08:20:04 »
I prefer esc on default layer, shift+esc for ~, then fn+esc for `.
Now, this would disable ctrl+shift+esc, but with custom layers you could specify ctrl to neutralize the custom shift layer on esc.
This all requires a keyboard you can flash firmware to, doubth you could do something this complex without it.
« Last Edit: Tue, 22 April 2014, 17:13:56 by p3lim »

Offline StylinGreymon

  • Keyboard Hipstar
  • Posts: 637
  • Location: Portland, OR
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #78 on: Tue, 22 April 2014, 17:59:24 »
For my Poker II, I used xmodmap to disable Caps Lock, and bind Escape to it, thereby freeing up grave/tilde.
I also switched grave/tilde to tilde/grave, as I never use grave at all.
If today had been a hippo, then you'd really have to worry about tomorrow.

Offline hjkl_over_wasd

  • Posts: 67
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #79 on: Tue, 22 April 2014, 20:11:11 »
Come to think of it, I've also freed up both my ctrl keys, as I use caps-lock instead (dual-role: ctrl and esc). I wonder what I should use them for. Any ideas?

Offline shawndumas

  • Posts: 7
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #80 on: Tue, 22 April 2014, 21:21:43 »
imap jk <Esc>

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #81 on: Tue, 22 April 2014, 21:23:12 »
Come to think of it, I've also freed up both my ctrl keys, as I use caps-lock instead (dual-role: ctrl and esc). I wonder what I should use them for. Any ideas?

You could always use some software and turn it into another modifier key (ex: "hyper")

I think that is why the HHKB removed those keys,  Mr. Wada found no use for them. lol. I guess that is another nice thing about the HHKB's "exotic" layout. It has room for both Escape and Tidle in the top row.

For any other 60% I would do what hjkl_over_wasd said (dule role keys). Right now I am running with the "Caps Lock" position key as Escape when tapped and Ctrl (or any other mod) when held. This frees up the escape key to act as a full time tilde. I'm not sure what I should do with my extra key now.
« Last Edit: Tue, 22 April 2014, 21:53:26 by Smasher816 »

Offline vimx

  • Posts: 90
  • ENHANCE
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #82 on: Tue, 19 August 2014, 12:17:15 »
I'm keeping it simple.  I mapped Pn+Esc to tilde.  Done.  In vim, I do most of my shortcuts with comma as my Leader key. 

And here is my ~/.xmodmap file:

Code: [Select]
! right alt as compose key
keycode 108 = Multi_key

! capslock as control
remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
add Control = Control_L

! left control as capslock
remove Control = Control_L
keysym Control_L = Caps_Lock
add Lock = Caps_Lock

Offline Quardah

  • Posts: 690
  • Location: Montreal, Quebec
    • DeliTech
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #83 on: Tue, 19 August 2014, 13:16:37 »
Did not read the whole thread i am lazy, maybe this was posted but whatever.

But if you can program stuff on the first edition poker just remap the tild to some other PN + anything key combinaition.
See my blog here : https://delitech.live

Poker II - Brown MX

Ducky One II TKL - Silver MX

TEX Shinobi - Clear MX

Offline hjkl_over_wasd

  • Posts: 67
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #84 on: Tue, 19 August 2014, 13:25:36 »
I've managed to setup arbitrary keyboard layouts in Xorg as shown in the guide I wrote back when I first got my Poker II. Since then I have modified the setup to an HHKB which works like a charm.

http://geekhack.org/index.php?topic=58529.msg1336905#msg1336905

The benefit of using this method even though it takes a bit more work than a simple xmodmap is that this will count as a full blown keyboard layout in your list of layouts. This means that you can switch between multiple layouts without breaking the mappings done with xmodmap. It's also nice when you want to experiment with multiple layouts and easily switch between them.

PS: use this command to find what scan codes are emitted by various key chords:
Code: [Select]
xev

Offline daerid

  • Posts: 4276
  • Location: Denver, CO
    • Rossipedia
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #85 on: Wed, 20 August 2014, 22:56:29 »
Did not read the whole thread i am lazy, maybe this was posted but whatever.

But if you can program stuff on the first edition poker just remap the tild to some other PN + anything key combinaition.

1st Ed. Poker is non-programmable.

Offline Quardah

  • Posts: 690
  • Location: Montreal, Quebec
    • DeliTech
Re: Linux, vim, and the Poker's escape/tilde combination
« Reply #86 on: Thu, 21 August 2014, 07:30:31 »
Did not read the whole thread i am lazy, maybe this was posted but whatever.

But if you can program stuff on the first edition poker just remap the tild to some other PN + anything key combinaition.

1st Ed. Poker is non-programmable.

What-a-bummer... How can one be Poking without Programming?
See my blog here : https://delitech.live

Poker II - Brown MX

Ducky One II TKL - Silver MX

TEX Shinobi - Clear MX