I've recently played with Cocoa, and created a windowed app, that
captures events and sends them to a pharo image via sockets. so i
learned how is done in COCOA. In Cocoa, there are 3 key events:
NSKeyDown: The user generated a character or characters by pressing a key.
NSKeyUp: The user released a key. This event is always preceded by a
NSKeyDown event.
NSFlagsChanged: The user pressed or released a modifier key, or turned
Caps Lock on or off.
"When the type of an event is NSKeyDown, the next step is typically to
get the characters generated by the key-down using the characters
method."
I think the COCOA VM, should simply forward this events to the image.
Esteban, would this be possible?
The three are enough, to preserve all the current behavior of Morphic.
In short, the VM should omit keyChar keyboard events, and start
announcing non-characters pressed or released events.
Fernando
On Tue, Jan 24, 2012 at 10:50 PM, Stéphane Ducasse
<stephane...@inria.fr> wrote:
> I should learn more on the topic :).
> But on the principle yes I want to avoid all the hardcode stuff everywhere.
> Guillermo in feb we should have a coffee meeting with a group building new UI using Python (of course)
> and I could ask them how they manage keystrokes. Or we can also interact with them by mail.
> May be they do not have the answer.
>
yes, it should be possible, but I need to see and think a bit on the best way to implement it... maybe a week end task?
best,
Esteban