[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] GUI keycode inconsistencies?
btw i'm totally in favor of letting those tabs, shift-tabs, ctrl-tab into the lang...
On 10/24/07, tom tlalim <
tlalists@xxxxxxxxx> wrote:sorry, i missed that...
so for cross-platform patches i'd better use unicode.
i now notice that modifiers get different values too.
any tips on a strategy for fully functional plug-and-play situations on all platforms?
grtz,
tom
On 10/24/07, Sciss <
contact@xxxxxxxx> wrote: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
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users