[LOGGED] Use of arrow keys with the keyboard watcher - Isadora 3
-
[EDIT BY Mark Coniglio]
This is a workaround for Isadora 3.0.6 and before will not work properly once we release Isadora 3.0.7!
Do not use this method if you want future patches to work properly.Re: [Keyboard Watcher actor - can I use the Up and Down arrows keys?](/topic/4916/keyboard-watcher-actor-can-i-use-the-up-and-down-arrows-keys)
i have just tested the funtionality of the keyboard watcher regarding to the arrow keys. In the (above mentioned) forum post there was a description how to watch for the arrow keys. In Isadora-3 the corresponding integer values have changed:
The key range sould be set to: 000-100. Then you get the following integer values, which you can work with (comparator etc.)
Hope this is helpful to others too,
gunther
key integer up arrow 0 down arrow 1 left arrow 2 right arrow 3 page up 44 page down 45 pos1 key 41 end key 43 enter 13 / key 47 * key 42 - key 45 + key 43 # key 35
-
Thank you for your efforts. This may work for now, but the numbers you shared are not actually correct because of a bug in the Keyboard Watcher that I am in the process of fixing today. Your system above will work for Isadora 3.0.2 through 3.0.6 but it will break as soon as I fix the bug and we release Isadora 3.0.7.
Details: Because we switched all character input values to Unicode for Isadora 3, the constants used to represent special keys (arrow keys, escape, etc.) had to change. However, the output range of the Keyboard Watcher not properly upgraded from the eight-bit value (0-255) used by Isadora 2 to the required sixteen-bit value (0-65535) needed to represent Unicode characters in Isadora 3. So, the numbers you are getting is because the high 8 bits of the actual value is getting chopped off which is not at all correct.
Your workaround does in fact work, but it will stop working as soon as Isadora 3.0.7 comes out, which will contain the actual fix for the problem.
This morning I completed the hard part: extending the range and making a major improvement: you can now simply enter the name of the key you want and it will show up that way in the Keyboard Watcher. See below.
The other part which I will do now is to to automatically update those old constants to new values when importing a patch created in 2.6.1 or before. This will ensure that Isadora 2.6.1 patches continue to work.
If you need this functionality urgently, please to join the beta program by submitting a ticket. I will be getting 3.0.7b1, which will have these fixes, to relatively soon.
Best Wishes,
Mark