On 18 June 2013 15:59, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guillermo
I thought that we decided to change and not use on: do: for shortCuts (I'm happy that we change because for me it took me a while to understand that the key was not an exception.
Could we deprecate on:do: on KMDispatcher? What is the replacement?
onKey: do:
initializeShortcuts "initialize the inspector' shortcuts with the dictionary defined in self shortCuts"
self shortCuts keysAndValuesDo: [ :key :value | list on: key do: value ]
=>
initializeShortcuts "initialize the inspector' shortcuts with the dictionary defined in self shortCuts"
self shortCuts keysAndValuesDo: [ :key :value | list onHold: key do: value ]
hold or press? you *press* the key, *hold* it for a while and then *release*. usually you receive 2 events - press and release. and you don't receive 'hold' event, since it is assumed that key is being held until it released. then on top of that, there is a key repeat functionality, is when user holds key it starts repeating (but again, ideally you don't receive a 'press' event, but you receive a synthetic 'keyChar' event)
Stef
-- Best regards, Igor Stasenko.