From: Jari A. <ja...@pr...> - 2005-12-08 09:04:24
|
> I'm not sure if there will be a straight forward way of using EV_REL =20 > events. Having 2^32 (input_event.value) entries for each=20 > direction in your config file definitely is not an option. Maybe > you can just map events to distinct directions (LEFT, RIGHT, > UP, DOWN). I will have a look at whatever you come up with. I agree that 2^32 button entries is a bit too much. :) I already tried mapping directions but ended up with something that repeats way too fast. The next idea is to have static variables for x and y axis and trigger a button press every time they have changed by some amount. I think that may work better. I'm also thinking of using 4 bits for modifier key status (Shift, Ctrl, Alt, maybe AltGr) since the Plextor remote uses those. What I had in mind for code format was something like this: 8 bits for event type (ev_key, ev_rel etc). 24 bits event type specific data Event type specific data for EV_KEY events: 16 bits for event code (key) 4 bits for modifier status 4 bits for event value (0 or 1) Event type specific data for EV_REL events: 8 bits for event code (axis) 16 bits for event value (direction and speed) I have to experiment a bit how to best convert the EV_REL values into button presses. Obviously chaging the code format like this will break existing config files, although it should be fairly trivial to convert from the old format. - Jari |