Manuscript (Case [Issue]22769) _Inbox - KeyboardKey class>>unixVirtualKeyTable uses KeyTable instead of UnixKeyTable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]22769) _Inbox - KeyboardKey class>>unixVirtualKeyTable uses KeyTable instead of UnixKeyTable

Pharo Issue Tracker
Manuscript Notification
avatar
Bug in Project:  _Inbox: Not Spam  •  You are subscribed to this case
Evaluating "OSPlatform current keyForValue: 255" on a Linux machine returns: "Key Unknown code: (255)". 255 is the code for the left shift key. The problem appears to be that KeyboardKey class>>unixVirtualKeyTable uses the default KeyTable instead of the UnixKeyTable. Changing the method to return the proper key table, we can get the result of "Key SHIFT_L code: (65505)":

KeyboardKey class>>unixVirtualKeyTable
UnixVirtualKeyTable ifNil: [ self initializeUnixVirtualKeyTable. ].
^UnixVirtualKeyTable

Also, inside the KeyboardKey class>>initializeUnixVirtualKeyTable, the right control and right option keys aren't defined like they are in the VM sources (sqUnixX11.c). The current code is:

at: -1 put: (self value: 16rffea); " kVK_RightOption = 0x3D"
at: -1 put: (self value: 16rffe4); " kVK_RightControl = 0x3E"

From the VM sources, the right option (alt) is value 246 and the right control is 250, so the code in that method should be:

at: 246 put: (self value: 16rffea); " kVK_RightOption = 0x3D"
at: 250 put: (self value: 16rffe4); " kVK_RightControl = 0x3E"

This was tested in:
Pharo 7.0.0
Build information: Pharo-7.0.0+rc1.build.36.sha.67dc1e8f9bae67bf17001a7c46413b072b19aa52 (64 Bit)
Priority Priority: 4 – Would be nice Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker