# Demand for hid\_input.c's process

- List: linux-input
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-input/2017/09/8930402/t

## Demand for hid\_input.c's process

- From: Takeuchi, Toshiki \<hidden\>
- Date: 2017-09-11 03:06:17 
- Message: https://ratatoskr.run/linux-input/2017/09/8930402.md

```text
Dear Sir or Madam

I'm facing a problem because of the implementation in "hid_input.c".
The function, “hidinput_configure_usage()” handles many usage.
However, usage=0x45(Eraser) is not supported on usage-page “HID_UP_DIGITIZER”.
So, this function add key “BTN_MISC” to map (because unknown usage) then.
I’d like to add the key which is endemic to eraser like “BTN_ERASER”.
Could you please add the process to “hidinput_configure_usage()”?
Or, if you can’t, could you please permit me to fix the process?

Thank you,
Best Regards,
Takeuchi.

------------------------------------------
竹内 俊貴(Takeuchi Toshiki)

〒160-6135
東京都新宿区西新宿8丁目17番1号
住友不動産新宿グランドタワー35階
Email:takeuchi.toshiki@wacom.co.jp
Tel:+81-80-9989-9873
------------------------------------------

```

## Re: Demand for hid\_input.c's process

- From: Dmitry Torokhov \<dmitry.torokhov@gmail.com\>
- Date: 2017-09-11 21:20:23 
- Message: https://ratatoskr.run/linux-input/2017/09/8930414.md

```text
Hi Takeuchi,

On Sun, Sep 10, 2017 at 8:06 PM, Takeuchi, Toshiki
[ref] wrote:
> Dear Sir or Madam
>
> I'm facing a problem because of the implementation in "hid_input.c".
> The function, “hidinput_configure_usage()” handles many usage.
> However, usage=0x45(Eraser) is not supported on usage-page “HID_UP_DIGITIZER”.
> So, this function add key “BTN_MISC” to map (because unknown usage) then.
> I’d like to add the key which is endemic to eraser like “BTN_ERASER”.

The event code for the eraser is BTN_TOOL_RUBBER:

#define BTN_TOOL_PEN            0x140
#define BTN_TOOL_RUBBER         0x141
#define BTN_TOOL_BRUSH          0x142
#define BTN_TOOL_PENCIL         0x143
#define BTN_TOOL_AIRBRUSH       0x144
#define BTN_TOOL_FINGER         0x145
#define BTN_TOOL_MOUSE          0x146
#define BTN_TOOL_LENS           0x147

> Could you please add the process to “hidinput_configure_usage()”?
> Or, if you can’t, could you please permit me to fix the process?

Please send a patch with proposed changes.

Thanks.

-- 
Dmitry
```
