[Cuis-dev] Control and alt keys in keyboard events

Mariano Montone marianomontone at gmail.com
Sat Dec 14 04:15:16 PST 2024


El 13/12/24 a las 17:26, Mariano Montone escribió:
>
> El 13/12/24 a las 16:22, H. Hirzel escribió:
>> The combination with alt+2 works. But sometimes not. It could be that 
>> it plays a role which window is in focus. I'll have to check. 
>
> Yes, it is a problem with focus. But I'm not able to overcome that. 
> There's a wasHandled flag in the KeyboardEvent, but it is not very 
> useful as it is not precise in the sense that, if some key combination 
> is ignored by the currently focused Morph, then I could make the event 
> bubble up until WorldMorph and trigger a global keystroke. But the 
> wasHandled flag is not always used like that, even when some key 
> combination is ignored, it is set to true, so I cannot tell if the 
> keyboard event was really handled or ignored from the outside.

I've added a #worldKeyStrokesPrecedence preference, enabled by default, 
to handle keystrokes set in World with precedence over other keystrokes. 
I don't think it is an ideal solution, but it is good given the problem 
with focus.

       Mariano



More information about the Cuis-dev mailing list