Keyboard Support

Is there any chance of getting a method to enable a module to get exclusive access to the keyboard? It’s more or less required to use any module that needs the keyboard for a full input device (e.g. DOSBox).

Unfortunately it’s kind of difficult to determine how to add this. Short circuiting input_key_pressed_func will stop the shortcuts, but these aren’t implemented through the keyboard on many platforms. It also wouldn’t unmap the game pad from keys.

RETRO_KEYBOARD was implemented quite some time ago. It allows you to query a keyboard button directly. Obviously, a user has to disable hotkeys on the regular keyboard (or move them to something they’d never use otherwise, or you’d get collisions.

Mudlord implemented it in his maxe libretro port (Chip-8 emulator). For convenience’s sake, here is the source -

https://github.com/mudlord/maxe/blob/master/libretro.cpp

http://pastie.org/5099953

I already got the keyboard working, the issue is that retroarch maps various shortcuts to the keyboard which makes typing next to impossible. For example, every time I type an ‘f’ the front end switches screen modes, or I type a ‘p’ and it pauses.

So, I managed to completely miss the config section for remapping the shortcut keys. It’s seems the obvious solution would be to add key modifier support. I guess I’ll just patch my copy to ignore keyboard shortcuts unless something like ctrl-alt-shift is held.

Yeah, funny how we didn’t even consider that up untl now.

Well, I think there should be some mechanism whereby RetroArch will ‘shut off’ all keyboard shortcut keys if the input device is of type RETRO_KEYBOARD - it is really the only sensible solution appearing to me. There should be a way to ‘switch’ though between shortcut keys mode and real ‘RETRO_KEYBOARD’ input mode - that way it’d cover both means of input.