# \[PATCH\] ati\_remote2 autorepeat and loadable keymap support

- From: Peter Stokes \<hidden\>
- Date: 2008-02-16 16:22:49 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2008/02/8909442
- Thread: https://ratatoskr.run/linux-input/2008/02/8909442/t.md

```text
The attached patch reconfigures the ati_remote2 driver to use soft-autorepeat 
functionality and adds support for loadable key maps.

I have reconfigure the driver to use the input system's built-in autorepeat 
functionality as the device only appears to be able to produce key repeat 
notifications at a fixed period. Switching to the software autorepeat 
functionality provides more precise configuration of the timings requested 
for repeat-delay and repeat-rate.

As this device is exposed as a combined keyboard and mouse, this change 
somewhat depends upon the suggested modification to the core soft-autorepeat 
functionality as outlined in my previous post to the linux-input mailing list 
(on 12th Feb 2008 entitled "Soft-autorepeat functionality"), without that 
modification, the mouse buttons are autorepeated :-(

The loadable keymap support exposes the ability to map 5 separate keycodes to 
each key (depending on which "mode" the remote control is currently in). 
Additionally, I have attempted to ensure that the scancodes used to map 
keycodes to the keys lie outside of the range normally covered by regular 
keyboards so as to avoid requests to remap the keys on the remote from being 
intercepted by a normal keyboard.

Any feedback would be gratefully received.

Thanks in advance.

Peter Stokes
```

## Attachments

- [ati\_remote2\_keycode.patch](https://ratatoskr.run/linux-input/2008/02/8909442/attachment/0) (text/x-diff, 13479 bytes)
