<div><div dir="auto" style="border-color:rgb(0,0,0);color:rgb(0,0,0)">I agree. I don’t want to change the way events work in Morphic and I don’t want to add extra complexity, what I’m proposing is to put the logic to handle a couple of global shortcuts in HandMorph or a subclass instead of hardcode them in the event classes. I wouldn’t even add preferences or anything like that that would add more indirection.</div><br class="Apple-interchange-newline" style="color:rgb(0,0,0)"></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 19 Dec 2020 at 10:36 PM, <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On 2020-12-19 05:48, Mauro Rizzi via Cuis-dev wrote:<br>
<br>
> Maybe we could have an object somewhere that contains a collection of <br>
> possible keyboard event triggers and the action they should perform?<br>
<br>
What happens now is that one uses mouseEnter and so forth with the hand <br>
position to determine keyboard focus.<br>
<br>
I want context sensitive keys. E.g. Smalltalk edit bindings vs <br>
game-move bindings depending on what object has the keyboard focus. I <br>
think of this as typical and expected. Control is distributed. Objects <br>
decide.<br>
<br>
To "steal" keys from the current keyboard focus object for overriding <br>
keybindings would seem to require [1] a filter in the KeyboardEvent <br>
class and [2] a protocol which can be overridden (like <br>
#allowsKeyboardOverrides) so that an object which really wants keys <br>
(think gaming) can get all of them and then if it does not want one <br>
re-delegates it back to the "global" bindings.<br>
<br>
Is the above better than what exists now? Does it carry its own weight? <br>
[This is easy to implement, but adds code and is more complex, and adds <br>
a new protocol which everyone needs to be aware of. There needs to be a <br>
strong motivator for change.]<br>
<br>
Other options?<br>
<br>
$0.02<br>
-KenD<br>
<br>
</blockquote></div></div>