Dear All,
I have recently bought a drawing tablet, which does not come with any Linux device driver.
It works perfectly even without any device driver. However, I would like to associate a script to each of the tablet buttons. I guess that whenever a button is pressed, a signal of such an occurrence can be captured by Fedora, but I do not know how.
Could someone please help me?
Thanks in advance,
Paul
On 2021-09-13 10:15 a.m., Paul Smith wrote:
I have recently bought a drawing tablet, which does not come with any Linux device driver.
It works perfectly even without any device driver. However, I would like to associate a script to each of the tablet buttons. I guess that whenever a button is pressed, a signal of such an occurrence can be captured by Fedora, but I do not know how.
Does it cause mouse clicks?
To find out what events are happening, you can install "evtest". If you run "evtest" with no arguments, it will give you a list of available devices. See which one(s) match your tablet and select it. Click the buttons and see what happens.
On Mon, Sep 13, 2021 at 7:08 PM Samuel Sieb samuel@sieb.net wrote:
I have recently bought a drawing tablet, which does not come with any Linux device driver.
It works perfectly even without any device driver. However, I would like to associate a script to each of the tablet buttons. I guess that whenever a button is pressed, a signal of such an occurrence can be captured by Fedora, but I do not know how.
Does it cause mouse clicks?
To find out what events are happening, you can install "evtest". If you run "evtest" with no arguments, it will give you a list of available devices. See which one(s) match your tablet and select it. Click the buttons and see what happens.
Thanks, Samuel. Yes, it causes mouse clicks.
"evtest" recognizes my drawing tablet, and when I successively hit the express keys I get the following:
---------------------------------------- Event: time 1631556826.892457, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556826.892457, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1 Event: time 1631556826.892457, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70013 Event: time 1631556826.892457, type 1 (EV_KEY), code 25 (KEY_P), value 1 Event: time 1631556826.892457, -------------- SYN_REPORT ------------ Event: time 1631556826.894445, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556826.894445, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0 Event: time 1631556826.894445, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70013 Event: time 1631556826.894445, type 1 (EV_KEY), code 25 (KEY_P), value 0 Event: time 1631556826.894445, -------------- SYN_REPORT ------------ ^PEvent: time 1631556828.294629, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556828.294629, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1 Event: time 1631556828.294629, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70008 Event: time 1631556828.294629, type 1 (EV_KEY), code 18 (KEY_E), value 1 Event: time 1631556828.294629, -------------- SYN_REPORT ------------ Event: time 1631556828.296599, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556828.296599, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0 Event: time 1631556828.296599, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70008 Event: time 1631556828.296599, type 1 (EV_KEY), code 18 (KEY_E), value 0 Event: time 1631556828.296599, -------------- SYN_REPORT ------------ ^EEvent: time 1631556829.256745, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556829.256745, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1 Event: time 1631556829.256745, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000f Event: time 1631556829.256745, type 1 (EV_KEY), code 38 (KEY_L), value 1 Event: time 1631556829.256745, -------------- SYN_REPORT ------------ Event: time 1631556829.258738, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556829.258738, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0 Event: time 1631556829.258738, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000f Event: time 1631556829.258738, type 1 (EV_KEY), code 38 (KEY_L), value 0 Event: time 1631556829.258738, -------------- SYN_REPORT ------------ ^LEvent: time 1631556830.196848, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004b Event: time 1631556830.196848, type 1 (EV_KEY), code 104 (KEY_PAGEUP), value 1 Event: time 1631556830.196848, -------------- SYN_REPORT ------------ Event: time 1631556830.198836, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004b Event: time 1631556830.198836, type 1 (EV_KEY), code 104 (KEY_PAGEUP), value 0 Event: time 1631556830.198836, -------------- SYN_REPORT ------------ ^[[5~Event: time 1631556831.106955, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004e Event: time 1631556831.106955, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1 Event: time 1631556831.106955, -------------- SYN_REPORT ------------ ^[[6~Event: time 1631556831.108925, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004e Event: time 1631556831.108925, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 0 Event: time 1631556831.108925, -------------- SYN_REPORT ------------
On 2021-09-13 11:16 a.m., Paul Smith wrote:
Thanks, Samuel. Yes, it causes mouse clicks.
I assume you're happy with those.
"evtest" recognizes my drawing tablet, and when I successively hit the express keys I get the following:
Event: time 1631556826.892457, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556826.892457, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1 Event: time 1631556826.892457, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70013 Event: time 1631556826.892457, type 1 (EV_KEY), code 25 (KEY_P), value 1 Event: time 1631556826.892457, -------------- SYN_REPORT ------------ ^PEvent: time 1631556828.294629, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556828.294629, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1 Event: time 1631556828.294629, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70008 Event: time 1631556828.294629, type 1 (EV_KEY), code 18 (KEY_E), value 1 Event: time 1631556828.294629, -------------- SYN_REPORT ------------ ^EEvent: time 1631556829.256745, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0 Event: time 1631556829.256745, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1 Event: time 1631556829.256745, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7000f Event: time 1631556829.256745, type 1 (EV_KEY), code 38 (KEY_L), value 1 Event: time 1631556829.256745, -------------- SYN_REPORT ------------ ^LEvent: time 1631556830.196848, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004b Event: time 1631556830.196848, type 1 (EV_KEY), code 104 (KEY_PAGEUP), value 1 Event: time 1631556830.196848, -------------- SYN_REPORT ------------
So the buttons are sending key combinations. You probably don't want to remap those globally, so I suggest using something like https://github.com/kmonad/kmonad or https://github.com/rvaiya/keyd to remap the keys. keyd only remaps, but doesn't run scripts, so you would have to remap the key to another one that you can use as a hotkey. kmonad allows you to run scripts as well.
On Mon, Sep 13, 2021 at 8:11 PM Samuel Sieb samuel@sieb.net wrote:
On 2021-09-13 11:16 a.m., Paul Smith wrote:
Thanks, Samuel. Yes, it causes mouse clicks.
I assume you're happy with those.
"evtest" recognizes my drawing tablet, and when I successively hit the express keys I get the following:
Event: time 1631556826.892457, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
So the buttons are sending key combinations. You probably don't want to remap those globally, so I suggest using something like https://github.com/kmonad/kmonad or https://github.com/rvaiya/keyd to remap the keys. keyd only remaps, but doesn't run scripts, so you would have to remap the key to another one that you can use as a hotkey. kmonad allows you to run scripts as well.
Thanks, Samuel, it seems perfect!
Paul