New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyMove] Control_L+hjkl to Left/Down/Up/Right #103

Closed
RyoIkarashi opened this Issue Sep 22, 2016 · 21 comments

Comments

Projects
None yet
@RyoIkarashi

RyoIkarashi commented Sep 22, 2016

Is there any way to use Control_L+hjkl to Left/Down/Up/Right to move cursor?
If it's not possible with Karabiner-Elements yet, do you know any alternatives to achieve the above?

screen_shot_2016-09-23_at_2_36_19

@ebzlo

This comment has been minimized.

ebzlo commented Sep 22, 2016

See #16 :)

@RyoIkarashi

This comment has been minimized.

RyoIkarashi commented Sep 22, 2016

@ebzlo Thanks for the reply!
Now I know it's not supported yet because it's limited to swapping two keys for now.
I've just donated for this awesome app :)

Do you know any alternatives to achieve this?

@seangaffney

This comment has been minimized.

seangaffney commented Sep 22, 2016

@RyoIkarashi I'm eagerly awaiting the same functionality, it's hardcoded into the way I type and navigate now... I've found a temporary solution by using Keyboard Maestro (they have a trial, although its length seems to be unspecified) with the following macros set up:

Of note: Make sure that the hotkey is set for "is down" and not "is pressed" if you want key-repeat to function normally.

Actually, here's a gist of the plist. You can just download the raw and drag it into Keyboard Maestro.

@RyoIkarashi

This comment has been minimized.

RyoIkarashi commented Sep 22, 2016

Thanks for the quick reply @seangaffney and an awesome workaround!
Here is exactly what I want! 😄

However it seems impossible in keyboard maestro to achieve Control_L+Shift+hjkl to Left/Down/Up/Right for text selection. Do you know any way to get this work?

I'm sorry for asking you guys many questions 🙇

@seangaffney

This comment has been minimized.

seangaffney commented Sep 22, 2016

Ha, yeah, I guess that's one of the benefits of actually remapping (what Karabiner does) vs. macros (what Keyboard Maestro does). I use vim for editing, so highlighting in this way isn't as big of a deal for me. 😄

@EvanLovely

This comment has been minimized.

EvanLovely commented Sep 22, 2016

Thanks for this idea @seangaffney ! I needed what @RyoIkarashi needed, so I just hashed it out further (though I use Diamond Keys instead of Vim keys). I've got my macros up in this gist and I'll try to keep it up to date with any bugs I come across in my uses. My keyboard muscle memory is ruined without this!!

2016-09-22 at 12 29 pm

@seangaffney

This comment has been minimized.

seangaffney commented Sep 22, 2016

@EvanLovely Nice!

My keyboard muscle memory is ruined without this!!

Haha, same.

@RyoIkarashi

This comment has been minimized.

RyoIkarashi commented Sep 22, 2016

Thanks for your great ideas @EvanLovely !
I also came up with the same solution and made a gist which may be the same with @EvanLovely 's one :)

@mariuslucamarius

This comment has been minimized.

mariuslucamarius commented Sep 24, 2016

Do you guys know a way to distinguish between the left and the right CMD keys in the trigger?

@cicloid

This comment has been minimized.

cicloid commented Sep 28, 2016

I'm also missing this functionality, but for know, I reimplemented the functionality temporally (I hope) in Hammerspoon

local function keyCode(key)
  return function() hs.eventtap.keyStroke({}, key) end
end

hs.hotkey.bind({"cmd", "alt"}, 'h', keyCode('left') ,  nil,   keyCode('left'))
hs.hotkey.bind({"cmd", "alt"}, 'j', keyCode('down') ,  nil,   keyCode('down') )
hs.hotkey.bind({"cmd", "alt"}, 'k', keyCode('up')   ,  nil,   keyCode('up') )
hs.hotkey.bind({"cmd", "alt"}, 'l', keyCode('right'),  nil,   keyCode('right') )
@greneholt

This comment has been minimized.

greneholt commented Oct 13, 2016

I also just donated for this feature. I've been using Karabiner for years to turn JKIL into arrow keys when semicolon is held down, and I find computers practically unusable when they don't have this setup.

@watsoncj

This comment has been minimized.

watsoncj commented Nov 7, 2016

I've hard-coded the arrows as fn+hjkl here: watsoncj@5531032

Not quite the same, but you can probably tweak it to match your preferences.

cc: @greneholt @cicloid @RyoIkarashi @seangaffney @mariuslucamarius @EvanLovely @ebzlo

@kkamdooong

This comment has been minimized.

kkamdooong commented Nov 8, 2016

I found another solution by using Hammerspoon.(I inspired from @cicloid)
Here is hammerspoon configuration. It just remmaping contrl + hjkl to arrow keys

@raulchen

This comment has been minimized.

raulchen commented Nov 17, 2016

@cicloid @kkamdooong: Thanks for your suggestions about hammerspoon, I tried it, but key repeat is super slow (compared with just holding arrow keys), do you have the same problem?

@kkamdooong

This comment has been minimized.

kkamdooong commented Nov 21, 2016

@raulchen
release note on hammerspoon v0.9.49

Changed: hs.eventtap.keyStroke() and .keyStrokes() now wait 200ms between the keydown and keyup events, to improve reliability

One of Hammerspoon team member comment this issue Hammerspoon/hammerspoon#1011 (comment)
So I edited my code this way

@raulchen

This comment has been minimized.

raulchen commented Nov 21, 2016

@kkamdooong thanks, it works great

@cperryk

This comment has been minimized.

Contributor

cperryk commented Dec 12, 2016

Thank you, @watsoncj! The solution you shared worked like a charm. Made your code changes and built manually.

Also tried Hammerspoon first like @kkamdooong and @raulchen but noticed that the key repeat would often suddenly halt after holding the key down for a couple seconds.

@xiaoheiyohehe

This comment has been minimized.

xiaoheiyohehe commented Feb 10, 2017

hard-coded the arrows as ctrl+hjkl here:
ctrl-hjkl-arrows

@cray0000

This comment has been minimized.

cray0000 commented Feb 12, 2017

You can use ⌘英かな for it and for other simple multikey remaps.

@briansoule

This comment has been minimized.

briansoule commented Apr 4, 2017

I also made a quick branch implementing left_option+hjkl
opt-hjkl-arrows

@stale

This comment has been minimized.

stale bot commented Mar 4, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 4, 2018

@stale stale bot closed this Mar 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment