4c2e775a10 (keys2): experimental handling of bare modifier keys

35 views
Skip to first unread message

Edward K. Ream

unread,
Apr 18, 2018, 3:32:14 AM4/18/18
to leo-editor
I have a half memory of people wanting to bind to bare modifier keys.

Does anyone bind commands to bare modifier keys? Have those bindings ever worked in the "keys2" branch?

This rev allows bindings like "Alt+", "Ctrl+", "Meta+" or "Alt+Ctrl+" to be passed into Leo.

This rev probably breaks existing bindings to bare modifier keys, but I'm just guessing.

Please let me know.

Edward

Edward K. Ream

unread,
Apr 18, 2018, 5:16:00 AM4/18/18
to leo-editor
On Wednesday, April 18, 2018 at 2:32:14 AM UTC-5, Edward K. Ream wrote:

This rev probably breaks existing bindings to bare modifier keys, but I'm just guessing.

Recent revs disable the experimental code.  It could put strange keys in the minibuffer.

Let me know if you use bare modifiers.

Edward

jkn

unread,
Apr 18, 2018, 5:56:22 AM4/18/18
to leo-editor

Hi Edward
    I have a 'maybe' use case; I want to be able to use key bindings that are already taken by Qt for top level menus. For instance, I want ALT+W for 'write[save] file', (for compatibility with CRiSP and my fingers), but this is taken by the top level Window menui shortcut. [I'd like to be able to turn off this Qt behaviour but haven't yet sorted out a way of doing it to publicise].

In the absence of that, CRiSP itselt has an option to allow such bindings to be entered sequentially; instead of ALT+W, you press the ALT key, then release, and then press W.

Clearly there are some dangers here, and in fact I have never had to use CRiSP like this. But it's a minor consideration for Leo.

    Regards
    J^n

Edward K. Ream

unread,
Apr 18, 2018, 6:07:15 AM4/18/18
to leo-editor
On Wed, Apr 18, 2018 at 4:56 AM, jkn <jkn...@nicorp.f9.co.uk> wrote:
I have a 'maybe' use case; I want to be able to use key bindings that are already taken by Qt for top level menus. For instance, I want ALT+W for 'write[save] file',
​..., but this is taken by the top level Window menui shortcut.

​Enabling traceEvent in eventFilter shows that Qt generates only StatusTip events for these Alt-keys.

Let me know if you find a way...

Edward​
 

jkn

unread,
Apr 19, 2018, 7:20:40 AM4/19/18
to leo-editor

Edward K. Ream

unread,
Apr 19, 2018, 1:01:01 PM4/19/18
to leo-editor
On Thu, Apr 19, 2018 at 6:20 AM, jkn <jkn...@nicorp.f9.co.uk> wrote:


I have a 'maybe' use case; I want to be able to use key bindings that are already taken by Qt for top level menus. For instance, I want ALT+W for 'write[save] file',
​..., but this is taken by the top level Window menui shortcut.


​Thanks for this.  I do not plan to make any related changes to the "keys2" branch. It is a big enough project as it is.  Feel free to create a separate Enhancement issue.

Edward
Reply all
Reply to author
Forward
0 new messages