On Javascript, there are :

   - onkeypress
   - onkeydown
   - onkeyup


I think we should have same API than other languages, especially popular
ones. So 1 of these 3 would be the best for me.

Why not onKeyPress:do: ?


2013/6/18 Goubier Thierry <thierry.goub...@cea.fr>

> Additionally, this is processing on a shortcut, that is possibly on a
> sequence of keys...
>
> So, onKey:do: isn't very good.
>
> The replacement of asShortcut by asKeyCombination in 3.0 wasn't too good,
> either.
>
> But, to be coherent, it should certainly be:
>
> onKeyCombination:do:
>
> Thierry
>
>
> Le 18/06/2013 16:44, Igor Stasenko a écrit :
>
>  On 18 June 2013 15:59, Stéphane Ducasse <stephane.duca...@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
>>>
>>
>>
>>
>>
> --
> Thierry Goubier
> CEA list
> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
> 91191 Gif sur Yvette Cedex
> France
> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>
>


-- 
Clément Béra
Mate Virtual Machine Engineer
Bâtiment B 40, avenue Halley 59650 *Villeneuve d'Ascq*

Reply via email to