Re: [Vm-dev] Simulated mousEvents are now pure morphic...your    thoughts on tackling keyboard events requested

gettimothy gettimothy at zoho.com
Fri Feb 14 12:55:35 UTC 2014


I need some money! Does GSoC apply to free-lancers with dwindling client bases?






---- On Fri, 14 Feb 2014 04:25:39 -0800 Frank Shearar<frank.shearar at gmail.com> wrote ---- 



On 14 February 2014 11:57, gettimothy <gettimothy at zoho.com> wrote: 
> 
> Bert. 
> 
> Thanks. 
> 
> You mentioned that ".. we never took the time to make all platforms present key codes uniformly. (We could still do it: up/down events are almost completely unused, partly because of this problem)...." 
> 
> This sounds like fun. I will poke around and try to understand the sub-system and get back to the list. 
> 
> Cheers. 
 
Could this be enough work for a GSoC project? (I say this knowing I 
might tread on your toes here, tty - not wanting to, nor wanting to 
take anything away from either your fun or your contributions: just 
wondering if we could someone to pay for this kind've work, and thus 
maximise VM work.) 
 
frank 
 
> tty. 
> 
> 
> 
> ---- On Fri, 14 Feb 2014 02:33:45 -0800 Bert Freudenberg<bert at freudenbergs.de> wrote ---- 
> 
> On 14.02.2014, at 00:34, gettimothy <gettimothy at zoho.com> wrote: 
> 
>> Hi All, 
>> 
>> I got pure Morphic MouseEvents forwarded just fine (thanks to your help on the bit-fiddling) and the translation is good enough to pop up a menu from the top menu bar. 
> 
> Nice! :) 
> 
>> Next up is KeyboardEvents and at first glance it looks a bit daunting. 
> 
> Key stroke events are pretty simple: you just put the ASCII code into one field and the Unicode into another. This is the same on pretty much any platform now. 
> 
> But for full emulation you also need to emulate key down and key up events. Those are platform-specific, each has their own raw key codes. Unfortunately we never took the time to make all platforms present key codes uniformly. (We could still do it: up/down events are almost completely unused, partly because of this problem). 
> 
> If you want to emulate up/down events, I think your best bet will be to emulate a Windows VM. Because on Windows, the keycodes are based on ASCII - the 'a' key has key code 65. This must be independent on whether shift is pressed or not, because it refers to the physical key. If you wanted to emulate Mac you'ld have to generate Mac key codes (A=0, S=1, D=2, F=3, etc). Unix/X11 might be easier too, I think it uses X11 keysyms, but IIRC the Unix VM does give different key codes for a and shift-a, which is wrong. 
> 
> - Bert - 
> 
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140214/1b10e34c/attachment.htm


More information about the Vm-dev mailing list