Hi, > In any case this whole array ought at some point to be > replaced with a Q_KEY code to ADB code lookup -- at the > moment we will convert Q_KEY to pc scancode to ADB code, > which is unfortunate if the pc scancodes don't include > some keys that ADB and the host keyboard do. (In fact, > wasn't this the reason why you wanted to do these patches?)
/me suggests: Step #1: convert adb.c to the new input api, check "commit 66e6536 input: switch ps/2 kbd to new input api" how to do it. Step #2: remove pc scancodes from translation, by moving from qemu_input_key_value_to_scancode to qemu_input_key_value_to_qcode and replacing the pc_to_adb_keycode[] map by a qcode_to_adb_keycode map. Which will also simplify the lookup because you don't have to worry about extended keycodes (scancode == 0xe0) any more. You might also inspect commit "65e7545 input: switch sparc32 kbd to new input api" which does the same for sparc (with both steps in one commit). cheers, Gerd