Closed rustyoz closed 12 years ago
Do any of the emulators have this implemented yet so that we can test?
Also, I looked through the decompile again and from what I can tell the key pressed / released are only triggered if the particular key is defined in the keymap of the emulator. And even on key pressed the value that is stored is the same as key typed. The difference is that if it key is in the map and triggers the key released then the key value gets OR'd with 0x100.
I think that a small update to AND the key value with 0x0FF will keep it clean until we handle the new event. Might also just wipe it to 0 to prevent double entries when pressed then released
ok i guess it will get sorted out once a good emulator environment from notch comes out.
Got a pull request here with an interim fix: https://github.com/0x10cAtlas/AtlasOS/pull/34 . This gets DevKit running - it actually seems to be supporting some KeyUp events - eg. try pressing s, and you will get a as an output: sS (where S has a different colour :)
from a decompiled version of the Java applet at dcpu.com/highnerd/ the code at https://gist.github.com/2410807 , i think shows that the keyboard counts along the ring buffer and supports three events KeyTyped KeyPressed and KeyReleased.
The current driver doesn't follow a buffer position/offset value, but i think it will register each event as simply another character. I think a new keyboard driver is needed.
Comments?