Keycode again

Hi,

quick query again as there was no response on the list on my previous
post regarding a patch enabling multimedia keys.

Is there ANY way to handle unknown keycodes (in my case from an ATI
RemoteWonder USB remote, the “DVD” key for example) in a portable way so
I don’t have to patch the SDL lib.

As far as I can tell, there is no way to support this without patching
SDL for a particular OS. As a solution, I suggest to add a user
registered callback function in the keyboard event handler where SDL
currently emits an error message. The handler can receive the unknown
keycode and could be programmed externally to respond to unknown codes
(i.e. create a user event).

Thanks
Andreas

Hi,

quick query again as there was no response on the list on my previous
post regarding a patch enabling multimedia keys.

Is there ANY way to handle unknown keycodes (in my case from an ATI
RemoteWonder USB remote, the “DVD” key for example) in a portable way so
I don’t have to patch the SDL lib.

As far as I can tell, there is no way to support this without patching
SDL for a particular OS. As a solution, I suggest to add a user
registered callback function in the keyboard event handler where SDL
currently emits an error message. The handler can receive the unknown
keycode and could be programmed externally to respond to unknown codes
(i.e. create a user event).

Seems to me that it would be better to add an SDLKey named SDLK_UNKNOWN
so that a normal keyboard event can be sent with a keysym tagged with
SDLK_UNKNOWN with the scancode filled in. Then you could work with
device specific scancodes for those weird keys.

	Bob PendletonOn Fri, 2004-12-03 at 12:06, Andreas Schiffler wrote:

Thanks
Andreas


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-------------------------------------+

Bob Pendleton wrote:>On Fri, 2004-12-03 at 12:06, Andreas Schiffler wrote:

Hi,

quick query again as there was no response on the list on my previous
post regarding a patch enabling multimedia keys.

Is there ANY way to handle unknown keycodes (in my case from an ATI
RemoteWonder USB remote, the “DVD” key for example) in a portable way so
I don’t have to patch the SDL lib.

As far as I can tell, there is no way to support this without patching
SDL for a particular OS. As a solution, I suggest to add a user
registered callback function in the keyboard event handler where SDL
currently emits an error message. The handler can receive the unknown
keycode and could be programmed externally to respond to unknown codes
(i.e. create a user event).

Seems to me that it would be better to add an SDLKey named SDLK_UNKNOWN
so that a normal keyboard event can be sent with a keysym tagged with
SDLK_UNKNOWN with the scancode filled in. Then you could work with
device specific scancodes for those weird keys.

  Bob Pendleton

That sounds like a good idea - I’ll try to make a simple patch for that.

Andreas