Wishlist: ability to specify numeric keypad keys in bindings

Bug #1207421 reported by Jon Nicoll
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Confirmed
Wishlist
Edward K. Ream

Bug Description

I am starting to look into creating my own set of Key bindings for Leo. I'd like there to be a way of specifying the use fo the Numeric Keypad keys separately from the main keyboard.

For instance, I want to use 'Keypad-Insert', 'Keypad-minus', 'Keypad-plus' to have specific keybindings cf. 'Insert', 'minus', 'plus'.

Edward replied via the Leo-editor newsgroup on 31stJuly2013:

{{{
It should be possible, but it won't be easy because it two very messy parts of Leo:

1. Translation of key codes to "canonical" key representation. This is done in the eventFilter method of the leoQtEventFilter class. This code is not only unbearably ugly, but it may also be keyboard specific.

2. Translation of user settings to canonical key representation. This is done in the keyHandlerClass class in leoKeys.py, specifically the nest of methods at:

    leoPy.leo#Code-->Gui base classes-->@file leoKeys.py-->
    class keyHandlerClass-->k.Shortcuts & bindings

...

A quick check of the Qt QKeyEvent class shows that key events have a KeypadModifier bit in the KeyboardModifier field, so it should be possible to distinguish keypad keys. It's just that Leo doesn't do it. And as indicated above, the change is not entirely trivial ;-)
}}}

Thanks a lot
Jon N

Changed in leo-editor:
assignee: nobody → Edward K. Ream (edreamleo)
status: New → Confirmed
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.