Skip to content

new keyboard driver based on notch's code #29

Closed
rustyoz opened this Issue Apr 18, 2012 · 4 comments

3 participants

@rustyoz
rustyoz commented Apr 18, 2012

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?

@chessmaster42
0x10cAtlas member

Do any of the emulators have this implemented yet so that we can test?

@chessmaster42
0x10cAtlas member

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

@rustyoz
rustyoz commented Apr 19, 2012

ok i guess it will get sorted out once a good emulator environment from notch comes out.

@mateusz
mateusz commented Apr 22, 2012

Got a pull request here with an interim fix: #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 :)

@chessmaster42 chessmaster42 added a commit that closed this issue Apr 27, 2012
@chessmaster42 chessmaster42 Fixed #18, ABI files load properly from filesystem
Fixed #29, keyboard input comes from HW now
Updated screen to use LEM1802
Broke example apps, will fix in next build
Updated version to 0.5.6
ef0840a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.