sq.h changes, grabbed reserved field in sqKeyboardEvent

Andreas Raab andreas.raab at gmx.de
Fri Mar 31 21:20:02 UTC 2006


John M McIntosh wrote:
> k, so on the key up/down can we pass up the unicode value? At least on 
> the mac at that point I know the unicode values in relationship to
> what the keyboard interaction was.

Well ... to be honest, I'd rather not do that unless we have a good 
reason to do it. Mostly, because people might get used to the idea to 
grab a utf char out of a key down event where in reality that mapping is 
inappropriate (unless you know precisely what you're doing and where). I 
agree that it can be helpful to know the utf value (if one exist) but 
I'm not even sure we can do this easily cross-platform (you still 
haven't answered my question about Ctrl-Shift-1 on Macs from an earlier 
email).

So if you could explain to me just once more which problem you're trying 
to solve with sticking the utf char into these event's I'd greatly 
appreciate it. I might appear daft here but I really don't want us to go 
down a slippery path that'll lead to a system which works in 98% of all 
cases but where the important ones are in the remaining 2%.

Cheers,
   - Andreas

> On 31-Mar-06, at 12:15 PM, Andreas Raab wrote:
> 
>> Here is another run at the fence:
>>
>> John M McIntosh wrote:
>>> Sure I can return 42 the magic number from LMGetKbdType() meaning you 
>>> are using as Estonia keyboard, or maybe
>>> 78 for Devanagari keyboard in the Indian Language Kit, however it's 
>>> unlikely I or any other developer will want to code the
>>> keyboard to ascii/macroman/unicode whatever translation tables in the 
>>> image.
>>
>> What we could do for trying to solve the problem Mike described, is to 
>> expose the functionality of ToUnicode or equivalent. E.g., instead of 
>> having the VM doing all the mapping, allow the image request 
>> information about "what would the result of mapping this key 
>> combination be" and basically use the information we get out of the 
>> keyboard events (meta state and key code). That way, if you wanted to 
>> map Ctrl-Shift-1 to Ctrl-! you'd filter out the Ctrl key, map Shift-1 
>> to "!" and are done.
>>
>> The issue here is that I've got no idea how hard it is to support this 
>> on other platforms...
>>
>> Cheers,
>>   - Andreas
> 
> -- 
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
> 
> 



More information about the Vm-dev mailing list