Open radiantly opened 4 years ago
I unfortunately lack the hardware to test this myself. Would you be able to add print(k)
to the top of the keymap.on_key_pressed(k)
function in data/core/keymap.lua
and report back what values you get for the keys which don't work as expected? Thanks!
Here it is:
keypad 0
keypad .
keypad 1
keypad 2
keypad 3
keypad 4
keypad 6
keypad 7
keypad 8
keypad 9
Interestingly, the output is the same when num lock is on.
My keyboard numpad has the same mappings as this one here.
Note: keypad enter
does not work either, but it looks like this has been reported in #131
I've made this as a temporary workaround https://github.com/rxi/lite-plugins/pull/90
In my current machine (Linux Manjaro + Cinnamon), using xev
I get different keys depending on whether the NumLock is active or not. How does lite get the keypresses?
@Tmpod I'm running Windows 10. for me numpad doesn't react to numlock. I haven't looked at the code, but I assume lite uses SDL events.
Looking at this resource, it seems SDL doesn't aknowledge function keys from the keypad... :/
I guess the workaround it to have lite keep track of the numlock state itself, but that sounds really bad lol
@Tmpod there is an SDL function to get the current numlock state with the current design, it would just mean passing that value into key press events, and mapping some keys (the way I've done) based on it
Yep, that sounds about right. We'd have to change system.c
I suppose? I have to take a better look at the C part of lite.
Yep, pass that value from system.c to here https://github.com/rxi/lite/blob/7517d0ef552c89cc24e0589a8df8eb9648217e24/data/core/init.lua#L325
When num lock is off, alternate functions do not work (direction keys, end, home, pgup, pgdown).
Also: really nice editor! Blazingly fast!