|
From: doug s. <hig...@ho...> - 2013-05-31 23:32:39
|
> >>for example linux freewrl doesn't quit on the win32 q keystroke. >> win32 keystrokes: >> 14 58111.046000 "X,2,x,1,X,3," "" >> 24 58121.687000 "Q,2,q,1,Q,3," "" >> linux keystrokes: >> 24 1369782152.529543 "x,2,x,3," "" >> 29 1369782155.037159 "q,2,q,3," "" >> . > . > I modified linux to give also a 1 ie when it gets a 3, it spits out a 1 first. > Then made it so linux and win32 both act on the 1 key (the 2, and 3 are used for a Node called KeySensor) > . I changed the .fwplay recording of keystrokes to integers (from char) so I can transmit control characters, And I moved the platform2web3dActionKey(key) mapping function earlier, and specialized it for LINUX and WIN32 for a bit finer granularity control to accommodate platform differences better -such as the DEL key which on win32 needs to be explicitly inserted into the transformed character stream for actions in StringSensor node, but on linux is a routine character- and so the special keys recorded in the .fwplay file can be played back on a different platform with the same meaning. . 10 30662.796000 "32,12,72,2,72,1," "" 11 30663.296000 "72,3,32,13," "" 12 30663.796000 "79,2,111,1,79,3," "" 13 30664.296000 "87,2,119,1,87,3," "" 14 30664.796000 "68,2,100,1,68,3,89,2,121,1," "" 15 30665.296000 "89,3," "" 16 30665.796000 "" "" 17 30666.296000 "" "" 18 30666.796000 "" "" 19 30667.296000 "" "" 20 30667.796000 "65535,12,65535,1,65535,13," "" The 65535 is 0xFFFF and stands for DEL, and the 12 means raw-action-key-down, 13 up (whereas regular raw keys get a 2 down, 3 up, and 1= translated (modifiers like shift applied) down+up keystroke. . Win32 can now use the numpad in fly mode, as can any system that identifies its numpad key scancodes and does the transform to NUM0-NUM9,NUMDEC which I've defined as an extension along with the web3d actionKey codes for KeySensor nodes http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/keyboard.html#Nodereference . I was able to test on Ubuntu linux and win32 XP. I don't own a Mac, and mobile devices are untested, but I tried very hard to leave things working the same assuming an app calls fwl_do_keyPress(char). The modified linux -using xlib handle_XEvents in Mainloop.c- and win32 call a new function fwl_do_rawKeyPress(int key, int type) directly, to achieve the better control and platform-specific platform2web3d lookup. A few things to check if you rebuild OSX: 1. Fly mode 2. KeySensor and StringSensor - here's some tests -use the *All.x3d except in the StringSensor set allowDeletion='true' to test the DEL key. http://dug9.users.sourceforge.net/web3d/tests/KeySensor/KeySensorTests.zip -Doug |