x11pygrid icon indicating copy to clipboard operation
x11pygrid copied to clipboard

List acceptable key names

Open SimonDedman opened this issue 5 years ago • 3 comments

Hi Michael,

Circling back to this after a long time; from this thread I was hoping to change my keys from + to +, i.e. I don't want to have to switch between numlock on & off every time I want to use pygrid. I tried changing the lines in ~/.config/pygrid.json from

"KP_1": "bottomleft",

to

"1": "bottomleft",

And rebooted but it then does nothing.

Please could you advise?

Thanks!

SimonDedman avatar Mar 30 '20 15:03 SimonDedman

Hey @SimonDedman ,

I want to know the same thing, as I'm using it on my laptop and I don't have a keypad. :-)

looking at the code it seems related to the def _bind_keys https://developer.gnome.org/gtk3/stable/gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse

But not sure how to change it. If you get an answer please let me know as well.

thank you guys, awesome program!

lucasmocellin avatar Apr 14 '20 12:04 lucasmocellin

One of the documentation pages states: "The names are the same as those in the gdk/gdkkeysyms.h header file but without the leading “GDK_KEY”."_ So I suspect the best documentation is the file itself.

https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/gdkkeysyms.h

pkkid avatar Apr 14 '20 13:04 pkkid

Thanks for this folks. Some progress - KP_Left & KP_Right are the same as KP_4 & KP_6 but weirdly they still need the numlock key to be off. So with numlock on, neither "4" nor "KP_4" picks up the keypress of 4 on the numpad. So this is starting to feel like a bug to me to be honest - given there are separate names for the non-numlocked keys (right, insert, etc), that the numlocked keys (KP_1 etc) don't register unless numlock is off seems wrong?

Is anyone with a full keyboard able to verify this?

SimonDedman avatar Apr 14 '20 15:04 SimonDedman