Skip to content
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
Closed

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

ryoikarashi opened this issue Sep 22, 2016 · 21 comments
Labels

Comments

@ryoikarashi
Copy link

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
Copy link

ebzlo commented Sep 22, 2016

See #16 :)

@ryoikarashi
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link

@EvanLovely Nice!

My keyboard muscle memory is ruined without this!!

Haha, same.

@ryoikarashi
Copy link
Author

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
Copy link

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

@cicloid
Copy link

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
Copy link

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
Copy link

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
Copy link

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

@raulchen
Copy link

@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
Copy link

@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
Copy link

@kkamdooong thanks, it works great

@cperryk
Copy link
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.

@xhyhh0
Copy link

xhyhh0 commented Feb 10, 2017

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

@cray0000
Copy link

cray0000 commented Feb 12, 2017

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

@briansoule
Copy link

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

@stale
Copy link

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 as completed Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests