-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Key remaps #6631
Comments
Hey, I believe that |
Ah! A fellow Colemakian... ;) I have a private layer that remaps HJKL to JKHL (so J is actually left and H is top in my configuration, unlike your drawing). Basically, when I notice a wrong keybinding, I go to the source, copy its definition, and make my permutation into the code. It's a bit of a pain, especially after a large Spacemacs update, but it has been stable for months now. I did that before It's not as if we could just remap globally HJKL to JKHL, because sometimes these keys are not used as movement keys ( In the meantime, I hope my layer can save you some time. |
Nice one, @fmdkdd — have installed your layer and it's working fine so far. Shall be testing it over the next few days and will keep you posted. |
Not true :-)
True :-) and it's exactly what
True :-) and it's exactly what
I made the layer as generic as I can given the complexity of the task. Think of border cases, like one layout that changes Think of the BTW you have the basic steps to add a new keyboard layout listed there, it should be fairly easy to try how it works for colemak. |
@StreakyCobra Ah! Sorry to spread misinformation. Like I said, I did my layer before But now it seems Thanks for the clarification! |
@StreakyCobra Hmm, I tried to add a colemak layout where HJKL becomes JKHL, like so:
So, if I understand that correctly, what I'm saying here is "J will be used for the movement H in every layer" (hence, J becomes Doing that will indeed remap HJKL to JKHL in Is this a bug? Also, if I want to pursue this, how do I find the active keymap, or the keymap that binds a specific key, apart from looking at the source code of the package? |
Yes it's right.
It's a good starting point :-)
Weird, I don't have this error message with bepo. I could understand that the remapping can fail, but this seems to be a problem with the Update: I just tested with your colemak definition, and Update 2: You don't have excluded Update 3: Don't forget that all keyboard layout being different, they may differs from one to another, and may require some custom tweaks (
It's the
But when packages are not following closely the best practices, or when some magic get into the practice (evilification for instance), etc. all this get messy, and the only way to find out is trial and error at the end. The timing when the tweak is loaded ( |
@StreakyCobra Ahh I had excluded Sometimes I will check the bindings in other packages and then probably submit a Colemak binding PR. Thank you for your guidance. |
https://github.com/syl20bnr/spacemacs/wiki/Keymaps-guide ☝️ Here is the reason why it's complicated 😂 |
Evil users using Colemak may be interested in my evil-colemak-basics package, designed as a smart hybrid between Colemak and Qwerty. The docs explain the rationale quite extensively. |
Just to add another perspective, I wonder how common it is for Colemak users to remap keys for evil or vim navigation versus leaving them as they are and (re)learning evil navigation with Colemak. Perhaps, I am in the minority, but I switched to Colemak first, then switched from holy to evil mode, so I never learned evil navigation with qwerty home row. I read around to see what vim users were doing who made the switch to Colemak and eventually decided to remap nothing. See: Colemak and vim: “But what about h/j/k/l?” | a little place of calm Seems to me that you can implement several different Colemak layouts in evil. How do you decide which layout to make the default? There doesn't seem to be an agreed upon method. I would guess that the layout (HJKL to HKJL) presented in the image above is probably a pretty common way to remap for Colemak. Here's an alternative method for using Colemak with evil. No remap: keep HJKL in ColemakPROS:
CONS:
I like the versatility of being able to use vanilla vim when I need to. You don't have to mess with configuring all the evil keymaps. I've also become used to the inverted up and down keys. It's like natural scrolling on Apple products. Like any habit, it becomes second nature over time. I am currently only setting
|
@namdnguyen I've come to the same conclusion! |
Not sure this is the place to put this, but as a long time colemak user I wanted to share my agreement with the commit in 4461721. The simple |
👍 for I'm currently in the mist of VIM -> Spacemacs switch and
for my updated version (https://github.com/quangv/.qv.space/blob/develop/.spacemacs#L311) |
I've been trying the key remap with a dvorak flavor by adding : One thing that is quite weird is that even though :
I've tried adding swapping the caps version as well but that didn't seem to work :
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
OK, so I posted this in #6264, but not sure if anyone will notice it there, so posting again here:
I am a long-time Colemak user.
I would like to change as few keys as possible in spacemacs. I want to try a small cosmetic surgery that would implement the following behaviour:
From what I understand, this would require simply swapping
j
andk
.How should I best do this?
The text was updated successfully, but these errors were encountered: