[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] GUI keycode inconsistencies?



hi tom,

from JSCView.html : "Note: The virtual java key codes are not translated into actual hardware key codes, thus the codes received through Cocoa GUI are different from those received through SwingOSC. For example, pressing '#' reports keycode 92 using SwingOSC or keycode 42 using Cocoa. Since java virtual codes are layout independant, there is no unique way to map them to Cocoa keycodes which are layout dependant (e.g. the 'Y' key will have different Cocoa keycodes on a QWERTZ and a QWERTY keyboard, while java will always attribute the value 89 to it). That's why an attempt to map values has not been made !!!"

sorry for inconvenience ...

Am 24.10.2007 um 19:28 schrieb tom tlalim:

hi sciss, adc, all,
thank you for the GUI scheme - i started using it for all my patches and it's excellent!

one strangeness though...
i get different keycode values in swing than in cocoa:

on a macbook, OSX:

a = GUI.window.new.front.view.keyDownAction_({|view, char, unicode, keycode| [ keycode].postln}).focus

hit "a, b, c, d":

GUI.swing
65
66
67
68

GUi.cocoa
0
11
8
2

any ideas why?

regards,
tom
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users