You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I remaped my CapsLock key to ModeSwitch to leverage Xmodmap so that I can have access to some nice stuff like arrow keys while holding CapsLock etc...
For the sake of completeness, my .Xmodmap looks like something like this:
clear lock
keycode 66 = Mode_switch
! Redifine keys to make use of Mode_switch layer
keycode 31 = i I Up
keycode 44 = j J Left
keycode 45 = k K Down
keycode 46 = l L Right
Most application like the web browser, emacs, xterm, xev etc... pickup that when I do caps+j it means Left.
I tried logging keys from my init.lua:
localon_key_pressed__orig=keymap.on_key_pressedfunctionkeymap.on_key_pressed(k, ...)
core.log(k)
returnon_key_pressed__orig(k, ...)
end
And basically what I see when I press ModeSwitch (aka CapsLock) is nothing, I pressed ModeSwitch 4 times at the end here:
So I dove deeper and saw another issue that mentionned the checkkeys program from SDL: #64 (comment)
And so I tried it and this is what happens when I press some keys, then I try the combination caps+j (which is Left):
But that's where I am starting to struggle as I am not yet very familiar with Lite-xl or SDL2.
I don't mind trying to fix this, but I will need a bit of hand holding here.
The text was updated successfully, but these errors were encountered:
As I don't really use X I can't directly help with this, but feel free to hop on our Discord server (an invite is at the top of our README and on our website) if you need anything.
After digging and thinking a bit, it seems that even if we hacked our way around to take into account the ModeSwitch key as a special modifier. It would still not take into account the Xmodmap remaps...
So the only way would then be to reproduce the the ModeSwitch+key bindings in lite-xl keymap. That really sounds like a last resort and pretty inefficient hack.
I remaped my CapsLock key to ModeSwitch to leverage Xmodmap so that I can have access to some nice stuff like arrow keys while holding CapsLock etc...
For the sake of completeness, my .Xmodmap looks like something like this:
Most application like the web browser, emacs, xterm, xev etc... pickup that when I do
caps+j
it meansLeft
.I tried logging keys from my init.lua:
And basically what I see when I press ModeSwitch (aka CapsLock) is nothing, I pressed ModeSwitch 4 times at the end here:
So I dove deeper and saw another issue that mentionned the
checkkeys
program from SDL: #64 (comment)And so I tried it and this is what happens when I press some keys, then I try the combination
caps+j
(which isLeft
):From this I understand 2 things:
My next guess is that something could be done about this here:
https://github.com/lite-xl/lite-xl/blob/master/src/api/system.c#L121-L147
But that's where I am starting to struggle as I am not yet very familiar with Lite-xl or SDL2.
I don't mind trying to fix this, but I will need a bit of hand holding here.
The text was updated successfully, but these errors were encountered: