How to customise a USB numeric keypad under GNU/Linux?
Something that relaxes me after hours of painting or drawing is doing DIY projects. It's always very rewarding for me to hack, repair or customise existing hardware.
Today I'm going to show you how I turned a cheap USB numeric keypad (also known as a numeric keypad, number pad, numpad, 10-key...) into a pad that I use for my digital painting shortcuts when I'm using my display pen tablet or when I'm painting on the go with my laptop. I bought this from a local computer shop for just 5€, a very good deal as this type of device usually sells for between 13€ and 30€. The build quality is a little bulky, the cable is thin and of poor quality, but in the shop I noticed that the keys felt good to press and weren't too noisy (they weren't even in sealed boxes). At this price, it wasn't much of a risk to try it out on a DIY project.
In this tutorial, I'll describe what commands and steps I used to create this project: remap the key on Linux, and paint the keys.
Disclaimer: This modification has limitations. You won't get a professional macro pad with these steps. The hack can only change one key to another. For example, you can't put Ctrl+Z
on a single key. You'll have to find a key for Ctrl
and another for Z
.
The duckyPad looks like a perfect solution (I never tried it) if you want something more advanced. It is also a different budget: around 100€. The project I propose on this page will cost 1/10th of that, and sometimes even less, because you can reuse a device like the one you find around you. In fact, it's not uncommon to find these accessories unused in the cupboards of many computer users.
Also, your device should work. This guide is not intended to solve the problem of broken keypads or keypads without drivers under GNU/Linux.
Let's start!
1. Find how the computer identify your keypad.
The lsusb
command line in a terminal should list your device among the full list of your other USB-powered devices. If you have trouble finding its name, unplug it, relist with lsusb and compare the two lists. My device is marketed under the brand name 'Mobility Lab', but thanks to the lsusb comparison we can see that it has a different name under the hood:
Bus 001 Device 004: ID 04d9:1203 Holtek Semiconductor, Inc. Keyboard
Hello 'Holtek'. But that name is not really important. What we are looking for is the number 04d9:1203
. This number is unique to the product, so unless you have exactly the same keyboard as me (or one with the same circuit board), you'll have a different one. Write it down somewhere, this is the number plate of our device.
2. List all the scancodes of your keys
Each button also has a special identifier. These are called scancodes. To list them, we need to install a tool. On Fedora, I do that:
sudo dnf install evtest
(If you're on Debian/Ubuntu/Mint, replace dnf with apt, the package will probably have the same name). Then run it, with sudo administrator privileges:
sudo evtest
Evtest will list all your USBs and ask you to select a target. Here you can see mine at event3, 4 and 5. I had the clue thanks to the 04d9:1203 lsusb identifier.
/dev/input/event2: Samson Technologies Samson Meteor Mic Consumer Control
/dev/input/event20: HD-Audio Generic Rear Mic
/dev/input/event21: HD-Audio Generic Line
/dev/input/event22: HD-Audio Generic Line Out
/dev/input/event23: HD-Audio Generic Front Headphone
/dev/input/event3: HID 04d9:1203
/dev/input/event4: HID 04d9:1203 System Control
/dev/input/event5: HID 04d9:1203 Consumer Control
/dev/input/event6: Dell KB216 Wired Keyboard
/dev/input/event7: Dell KB216 Wired Keyboard System Control
/dev/input/event8: Dell KB216 Wired Keyboard Consumer Control
/dev/input/event9: UGTABLET 24 inch PenDisplay Mouse
Select the device event number [0-23]:
After selecting a device (e.g. 3), Evtest will begin to 'listen' to the keystroke and give detailed feedback on each keystroke. Here is a paragraph for a single key press.
Event: time 1693422668.703634, type 17 (EV_LED), code 0 (LED_NUML), value 0
Event: time 1693422668.703634, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005f
Event: time 1693422668.703634, type 1 (EV_KEY), code 46 (KEY_C), value 1
Event: time 1693422668.703634, -------------- SYN_REPORT ------------
In this paragraph we are only looking for the MSC_SCAN
value. For our key it is 7005f
. Make a note of all the MSC_SCAN values for your keyboard keys. If some keys return nothing, also check if your device had other evtest entries (mine has 3). You'll find them this way (e.g. this was the case for my calculator key, alone on event5). I also have the 00
key on the bottom of my device, which is a special key. It has a hardcoded behaviour: it types the number 0
twice. If I replace 0
with anything, this key just repeats it twice. I'll just do the best I can to avoid the use of this key.
The keypad with the scancodes written on top of the keys (click to enlarge).
3. Assign custom keycodes to your device
Start by making a plan or sketch of your future keyboard layout; it's not easy, and it's a good idea to do this with a pencil and eraser, as you may change your mind during the design process.
To apply our plan, we'll create a new file at /etc/udev/hwdb.d/95-custom-keypad.hwdb
(use your editor with administrator privileges, in my case: sudo micro /etc/udev/hwdb.d/95-custom-keypad.hwdb
).
The filename is flexible:
95-
= you can use any two-digit number to start your filename. It's used to sort the configuration files.custom-keypad
= your custom description of your device, lower case, no spaces (you can replace it with the - separator)..hwdb
= the extension, mandatory.
Here is the content I put in this file:
evdev:input:b0003v04D9p1203*
KEYBOARD_KEY_70029=0x29 # [Esc] => [²]
KEYBOARD_KEY_c0192=0x02 # [Calculator] => [&1]
KEYBOARD_KEY_7002b=0x03 # [Tab] => [é2]
KEYBOARD_KEY_7002e=0x04 # [=] => ["3"]
KEYBOARD_KEY_70053=0x2b # [Numlock on/off] => [*]
KEYBOARD_KEY_70054=0x10 # [/] => [a](q)
KEYBOARD_KEY_70055=0x11 # [*] => [z](w)
KEYBOARD_KEY_7002a=0x12 # [Backspace] => [e]
KEYBOARD_KEY_7005f=0x1f # [7] => [s]
KEYBOARD_KEY_70060=0x2f # [8] => [v]
KEYBOARD_KEY_70061=0x15 # [9] => [y]
KEYBOARD_KEY_70056=0x14 # [-] => [t]
KEYBOARD_KEY_7005c=0x38 # [4] => [Alt]
KEYBOARD_KEY_7005d=0x1e # [5] => [q](a)
KEYBOARD_KEY_7005e=0x2e # [6] => [c]
KEYBOARD_KEY_70057=delete # [+] => [Del]
KEYBOARD_KEY_70059=0x2a # [1] => [LShift]
KEYBOARD_KEY_7005a=0x56 # [2] => [<]
KEYBOARD_KEY_7005b=0x2c # [3] => [w](z)
KEYBOARD_KEY_70058=0x1c # [Enter] => [Enter]
KEYBOARD_KEY_70062=0x1d # [0 => [LCtrl]
KEYBOARD_KEY_70063=0x39 # [.] => [spacebar]
The first line targets the device:
b0003
= 0003 stands for USB device.v04D9
= first value of lsusb identifier, but capitalised and with a leading v.p1203
= last value of lsusb identifier, but capitalised and with a leading p.*
= wildcard to match any other number after it.
Then we have an incremented list of key definitions. It uses the syntax: KEYBOARD_KEY_<scancode>=<target keycode> #<a comment written the way you want>
. About the scancodes, we should have the whole list thanks to evtest. The target keycode can be keywords from this list or Qwerty scancode in this type of visual. Just prefix the scancode with 0x
and keep it in lower case. (e.g. Y = 15 => 0x15
). Note that all changes will be made from the perspective of a Qwerty keyboard, so if you enter the keycode for 'a' on an Azerty, you'll get a 'q'.
When you are done, save, quit and refresh the system with this command line:
sudo systemd-hwdb update && sleep 2 && sudo udevadm trigger
The keyboard should work, but it is normal to have to make adjustments and go through several loops of editing and testing.
4. Customize your keypad
This part is entirely up to you. A simple suggestion for your project: draw on sticky paper labels and plastify them with clear tape, no need to sand the keys or anything.
For my part, I decided to experiment and paint the key with coloured nail polish. This varnish (acetone based) is very strong when dry and resistant to key presses. But it's also super thick and sticky and it's very difficult to make thin lines or details.
To clean the keys, I sanded them in two passes: 320 grit to remove the letter, then 400 grit to smooth them. I had a can of black spray paint around, so I applied a thin coat, as sanding the keys turned them a dull dark grey.
Sanding and coating with black paint.
My guideline was to make each key visually unique and not take the thing too seriously. I had a lot of fun! But I was often frustrated because my lines were very thick and wobbly and I was constantly fighting against the drying time and the lack of control.
Finally, here's how I use the keyboard.
The final result with notes on how to use the customisation.
I wish you lots of fun with your own future projects!
Your customised keypads:
I'll post here photos of your keypads (with authorizations).
2023-09-10: Kathy Murdoch's "kapelloboard" (original post here)
Sources:
- https://www.freedesktop.org/software/systemd/man/hwdb.html : the manpage, a bit crude, but with tips.
- https://wiki.archlinux.org/title/Map_scancodes_to_keycodes : a solid tutorial with really cool links to go further.
- https://github.com/systemd/systemd/blob/main/hwdb.d/60-keyboard.hwdb : A massive hwdb file full of possible syntax example.
- https://www.youtube.com/watch?v=D0gTkPAkFIs : Nail painting art for beginners.
Other methods from the comments:
GUI method via Input-Remapper:
Moini posted a link to the free/libre and open source software Input-Remapper. I have tested it and it was easy to install following the instructions in the README.
This tool has a graphical user interface and will detect all your USB devices: your keyboard, gamepads, mouse and tablet. It can also enter macros and complex input (e.g. shortcuts such as Ctrl+Z
). You can also assign multiple presets to the same device.
On the downside, you always have to have the software installed and running (or the systemd daemon), and if your device has a feature for going to sleep (or disconnecting from Bluetooth, or simply not being powered on), you'll have to reopen Input-Remapper and press 'Apply' after the device has come back from sleep. If the whole system goes to sleep, the connection might have difficulties to reconnect.
That's why I stopped using it after the excitement of the first few days of test. My keypad wasn't always plug and play and I had to go in a series of menus and clciks to get it ready again (something that I don't experience with the hwdb method described in the article). That's why I'll continue to prefer my method and have moved this part to the footer of the article as a note.
But Input-remaper is easy and your best option if you need complex shortcut or macros. Read the basic Usage tutorial section of the documentation and then the Examples. You'll save a lot of time and your imagination will open up to the many possibilities this software has to offer.
93 comments
BartV@mastodon.social
brilliant! I’ll share this with my kid, he couldnuse this. Thanks, David!
★Anna@mastodon.art
It looks very useful for drawing outdoors :blobcateyescoffee: Also I love how you painted the keypad, it looks so fun!
★davidrevoy
@Anna 😊 Thanks!
★trevorflowers@xoxo.zone
Sort of off topic but I wonder whether anyone has used two 10-key pads turned sideways as a cheap-o split ergo keyboard.
davidrevoy
@trevorflowers This interesting, but I'm not sure technically how one could match two similar keypads (assuming it is the same model, for aesthetic) because the evdev:input: identifier on top of the two hwdb files would be the same, and then the one with the filename sorted in last would overwrite the config of the first.
But it could work in theory with two differents keypad product (and probably require a lot of planning too 😅 ).
trevorflowers@xoxo.zone
Indeed, it seems so far out of the normal use path that there would be trouble. Perhaps two pads that are minor revisions of the same model would look alike but have different IDs. I'm pretty sure that this is a silly idea. 😹
★swetland@chaos.social
@trevorflowers Probably doable if they have unique serial numbers... which unfortunately is unusual for keyboard/mouse peripherals, *but* would be easy enough to add to something with customizable firmware (QMK being popular).
I've found QMK pretty painless for getting stuff wired up:
★https://chaos.social/@swetland/109952663470163103
https://chaos.social/@swetland/110165024029705851
trevorflowers@xoxo.zone
@swetland A goofy mock-up.
🖼️ 030532e9e01d3e12.png ★swetland@chaos.social
@trevorflowers Given how easy QMK is to customize (see links in my edited reply above), how easy it is to lay out a simple keyboard PCB, and how inexpensive they are to manufacture these days, I'd probably lean toward building custom stuff here rather than using keypads turned sideways (which I suspect would feel kinda weird to type on).
★trevorflowers@xoxo.zone
@swetland Oh, for sure. I just like the idea of pulling a couple of ten-keys out of the $1 pile and turning them into a "fancy" split ergo with basically no effort.
★trevorflowers@xoxo.zone
@swetland It may be time for a trip to my local PC refurbisher, Re-PC. I don't know why my brain latches onto this sort of thing, but here we are.
★davidrevoy
@trevorflowers @swetland Oh yes, this is fun. 😆 One of my next project will use a Keypad again; I saw in the list of possible keys https://hal.freedesktop.org/quirk/quirk-keymap-list.txt all the f13 to f22 function keys. I want now an extra bonus Fkeys addon to map many shortcuts on my softwares. I made a quick test: it will work also with OBS for a cheap live stream deck.
2 ★trevorflowers@xoxo.zone
@swetland Although, I suppose it should be arranged like so.
🖼️ 387dcbb8929aa11b.pngmonk@social.unboiled.info
@trevorflowers @swetland note that while this one has a 00 key, you won't be aple to use it as a proper keys
trevorflowers@xoxo.zone
@monk I don't understand. Why couldn't one remap that key like any other?
monk@social.unboiled.info
@trevorflowers because the controller will rapid-fire indistinguishable-from-normal zeros when you press it, and might not even report the releasing in any remotely sane way. At least that's how it went on the units I had.
Yeah, you can probably distinguish pressing it from double-pressing a zero by checking for an inhumanly precise interval between the zeroes, but using it as, say, a modifier won't fly. And a keyboard of this size needs modifiers.
trevorflowers@xoxo.zone
@monk TIL that this is how the 00 key works. I guess it makes sense but yeah, annoying for me to do this (probably bad) idea. I plan to go to my PC refurb warehouse soon so maybe they have pads without the 00.
monk@social.unboiled.info
@trevorflowers sure. but they have this awful arrangement of larger keys that ain't even symmetrical when you do that
bluejorts@kolektiva.social
@trevorflowers I'm gonna find the fuck out lol. My Mistal split keyboard cost way too much for me to want to replace it. and I run Linux anyway.
jookia@social.tchncs.de
Hi Deevad, I just want to point out that USB VIDs are not unique to every keyboard but every product at best and every product that uses a certain microcontroller at worst.
That said I'm not sure what a better solution would be :) Just keep it in mind that someone could theoretically lose the draw and have two of the same VIDs
davidrevoy
@jookia Hey Jookia, thanks for the feedback. I'll fix the article 👍
★jookia@social.tchncs.de
Great!
Also not sure why I called you deevad haha :)
davidrevoy
@jookia That's my name on IRC, and we spent a lot of time discussing on it, maybe it is your muscle memory. Totally fine. 😊
★devnull@mamot.fr
@jookia USB Vendor IDs (first ID lsusb) are not unique, as all the devices from the same manufacturers well have the same but USB Product IDs (second ID in lsusb) combined with Vendo IDs are "unique enough", so unless you use abnormally high number of different USB HID devices and you are extremely unlucky to have the same VID and same PID for 2 similar devices (numpads, or numpad and keyboard), risk or having these remapping accidentally applied to other devices are pretty low.
★
jookia@social.tchncs.de
@devnull
Yes I meant VID+PID combination
★devnull@mamot.fr
@jookia If you own multiple numpads/keyboards, you can still easily (should?) check whether you have more than one with the sane ID as the one you want to remap keys for, but chances are low enough.
dbat@mastodon.gamedev.place
This is such wonderful info. Thanks a million!
★jujudraw@mastodon.art
oh la la je vais prendre l'idee!
★Paul_Aguayo@qoto.org
what a beautiful, interesting and useful project.
★Thanks for sharing
finlaydag33k@social.linux.pizza
Bookmarking for later.
Could come handy for my video editing stuff.
kbsez@postchat.io
This is freaking awesome, David! Thanks!
I'm intrigued what editing and motion graphics things I could do with this idea...
emanoel@bolha.us
thanks for sharing. Amazing idea
Moini
Hey - I use something similar, buttons don't look as nice, but programming it was so much easier with the GUI program Input Remapper:
https://github.com/sezanzeb/input-remapper/releases
Moini
Also available in Debian and Ubuntu, but not the latest version, I suppose.
It can also assign keycombos and keyboard sequences to keys. Super cool tool!
2 ★davidrevoy
@Moini Oh! very cool, thanks for sharing. I'll have a look at it. 👍
★AlexanderMars@mastodon.social
@Moini wait, so I can use this to turn a generic numpad into a macro pad?
★davidrevoy
@AlexanderMars @Moini I just made a quick test and WOW. https://github.com/sezanzeb/input-remapper is amazing. The README has install method for Fedora and it was easy to install. It works really well and detect my Keyboard, my Xp-Pen buttons, button on my USB microphone! It really can input macros (multiple keys, composed shortcuts, and special keys) and you can have multiple presets for the same device. It cannot neutralize devices with hardcoded multiple keys (expected). I'll update the article with a note 😍
3 ★AlexanderMars@mastodon.social
@Moini I think every #krita #inkscape #gimp user would want to know about this. Just need a cheap numpad and you have a custom macro deck. Gotta star the hell out of that project!
2 ★Moini
@AlexanderMars I made mine for screencasting, and indeed, Inkscape (it can mute me, and start/stop recording, copy-paste etc.) :) Haven't used it for that yet, though.
But yes, super cheap, super easy, and all in all pretty great!
★AlexanderMars@mastodon.social
@Moini I just wish I had one of those num pads in the back of the closet, but I’ve never actually needed one.
★bszlrd@mastodon.art
This kind of setup is a godsend for lefties. I developed a similar one during the years for Krita. And recently I've found a keypad that has the the whole right side of a keyboard, which is quite convenient.
🖼️ 1436cea05fc32942.png ★I'm also using a similar setup in Blender, and the nice thing there is that you can use any key as a modifier, so 0+keys can be used for example for additional stuff.
davidrevoy
@bszlrd Cool device with all that keys! I'm jealous of the arrows directional keys (and page up/page down); if I had those on my pad, I could use it as a gaming pad in transport too xD
bszlrd@mastodon.art
It is a Satechi bluetooth keypad, and not too expensive even. Although I found that it can lag sometimes, and I'm not yet sure what's causing that.
🖼️ 93edb5704d937db9.jpg ★And oddly enough the Delete key starts Firefox for some reason :D
bszlrd@mastodon.art
And out of curiosity, how sturdy is the nail polish on the keys? I thought about customizing my keypads, but it never occured to me to use that.
davidrevoy
@bszlrd Nail polish is very resistant; I already customised buttons with that and they never erased or went to powder.The bright colors might catch a bit of dirt over time from fingers,but it's washable. The main drawback are about how thick and hard to apply for making clean details, and also the fact that acetone or any product to wash the nail polish might attack and start diluating the plastic too. So, it's hard to erase. It's possible, but probably would require to sand the key again after.
2 ★bszlrd@mastodon.art
That's cool to know, thanks! I'll certainly try it.
★captain_arepa@moar.cachapa.xyz
@davidrevoy@framapiaf.org This is relevant to my interests :pepe_nerd:
★grs@infosec.exchange
That's pretty dang neat. I had no idea the Yogas could enable such fine work.
★portugalense@masto.pt
i have the same laptop as yours, did you manage to make the fingerprint reader work?
davidrevoy
@portugalense No, I noticed it, but as I'm not using it I haven't even tried. I remember the Arch wiki had something about it: https://wiki.archlinux.org/title/Lenovo_ThinkPad_Yoga_370
portugalense@masto.pt
fedora not same s arch , and i already tried and honeslty gave up thank you non the less 😊
★lexd0g@wetdry.world
@portugalense https://gist.github.com/borcean/f32c47f6cc52cee33dfc2265ce63f777 try this, worked on my x380 yoga and the 370 seems to have the same sensor
★davidrevoy
@lexd0g @portugalense Thanks Alice for the link, I'll bookmark and test. 👍
2 ★omidmnz@functional.cafe
Maybe try KMonad or Kanata. They provide a lot of the functionality of a QMK keyboard, e.g. different functions for tap/hold, tap-dancing, layers, mapping to key combinations, etc., with a much more readable configuration.
davidrevoy
@omidmnz Thanks for the guidance to better method. Do you have a tutorial in mind about them for beginners?
★davidrevoy
@omidmnz 😺 I found it! https://www.youtube.com/watch?v=Dhj1eauljwU
2 ★omidmnz@functional.cafe
that's a good one. Be sure to at least skim the documentation though. You might find features uniquely useful for your workflow that might not be as appealing to a programmer.
★drazraeltod@chaos.social
that is a nice idea…
now I'm thinking about if it were possible to use a bluetooth one as a remote for #HomeAssistant…
😃
★davidrevoy
@drazraeltod Oh, let me know if you find info about this, this is interesting.
davidrevoy
@drazraeltod Update! I had this bluetooth gamepad at home (a cute mini 8BitDo Zero 2 https://www.8bitdo.com/zero2/) and if I put it in keyboard mode; evtest catches the events and gives the product/vendor info (not listed in lsusb).
★I also got feedback about an utility 'input-remapper' that makes all of the setup easy with a GUI. So it should work with bluetooth keypad as well following the same method. I updated the article.
screambiogenesis@mastodon.social
Nice. Thanks for the evdev writeup (and FWIW, the package name in Arch-alikes is 'evtest' instead of 'evdev'). I knew that kind of thing was possible, but had never put in the time to figuring it out.
And the paintjob is fun. I bet doing it that way actually helps burn the connection into your brain, too.
★davidrevoy
@screambiogenesis Thanks! And oh, I just had a check at my `dnf history` and the package is evtest too. That's a big typo, thanks for finding it, I'll fix now. 👍
★mhunt@socel.net
very nice!
★primarchjennifer@pipou.academy
I'm definitely reading that tomorrow.
★Tomoko_Kuroki@mastodon.social
Nice, my coworkers are still amazed that I got my Wii UDraw tablet to work on the computer. Though that is more hardware hacks if anything.
★alchemicacht@tech.lgbt
looks great. I never see cheap numpads here, because nobody seems to use them. Saw them only in an online shop and they were almost as expensive as regular keyboards
★davidrevoy
@alchemicacht Thanks! Maybe they are easy to find in France because the Azerty layout needs an extra step (pressing shift) to activate numeric; so it is not easy to make accounting or office work from laptop. On the Fr refurbished market place , I can find tons of them from 1 to 5€ https://www.leboncoin.fr/recherche?category=15&text=clavier%20num%C3%A9rique&price=1-5
libresurf@pouet.chapril.org
I like it !
I want the same !
davidrevoy
@libresurf 😊 Thanks!
hopesquara@cupoftea.social
That's genius!
★davidrevoy
@hopesquara
OmegaPolice@hachyderm.io
This is great, nobody should have to buy Stream Decks and the like!
I got myself a FaunchPad and a Butter Stick from gboards.ca a while back for similar purposes, but they seem to be down. :/ They offered some affordable small keyboards runnig QMK!
tibi@mastodon.art
I love the paintjob! I wanna do something similar, good to know that the nail polish holds up. Did you use any special technique for painting the plastic or just the brush and palette seen here?
★davidrevoy
@tibi Thanks! I only watched this video https://www.youtube.com/watch?v=D0gTkPAkFIs (or quickly browsed into it), I used also toothpick to make dots, and I found that a little drop or two of dissolvent (acetone) help to fluidify a bit if the liquid become to thick. Also, my mistake: trying to put yellow on top of black; I had to do three layer because my yellow is not really very covering well. If I knew, I would have started with a first pass of white, then yellow on the top. Two layers, less wobbly.
★tibi@mastodon.art
all very useful info, thank you! as an aside i like how the nail polish here can create tactile bumps on the keys
davidrevoy
@tibi Oh yes, big dots are indeed very useful for that. I used them on my previous stylus that was really flat https://www.davidrevoy.com/data/images/blog/2023/2023-06-27_lenovo-370-on-linux_stylus-customisation_net.jpg
tibi@mastodon.art
oh thats clever! i might just try this too. ive basically given up on pen buttons since theyre so bad for this reason
★raghukamath@mastodon.art
now I know what to buy and do on sunday
★davidrevoy
@raghukamath 😉 Cool!
Here I'll customize also an https://www.8bitdo.com/zero2/ gamepad I have. I saw the event listed on evtest this morning. Because it is super small and wireless (and also less buttons), this one will be for my desktop computer, when I have my left hand in a position not on the keyboard or the shortcut keys of the tablet.
★vertenote@mamot.fr
Super interessant. Je n'ai pas de pavé numérique sous la main mais bien un MakeyMakey. Votre tuto me permettra d'aller plus loin que la fonctionnalité remap qui y est intégrée.
Merci :-)
davidrevoy
@vertenote Je conaissais pas ce projet, c'est trop cool comme sensor. Merci pour le partage 🙂
★yoyunix@mastodon.social
One thing you could do to turn this into something more like a MacroPad is to bind your NumPad keys to shortcuts in a script for an AutoHotKey port for GNU/Linux (for example, AHK_X11 ( https://github.com/phil294/AHK_X11 ) is what I used, and should work for any X11-based distro). The NumPad keys don't get registered by anything other than the AHK interpreter, so you don't have to worry about them accidentally triggering some other action they were bound to.
davidrevoy
@yoyunix Thanks for sharing this tool!
But I think I found the ultimate tool for macro: the one I tested this morning https://github.com/sezanzeb/input-remapper thanks to the comment of Moini (and added it to the article, you probably saw it). It's X11/Wayland compatible, has a GUI , presets and can also do complex macro (even mixing keyboard and mouse click, or macro with 'wait' between actions so I can do combo of shortcut keys.
yoyunix@mastodon.social
Oh! I didn’t see that, and it looks a lot simpler than my suggestion 😅.
davidrevoy
@yoyunix That was also my feeling when I tested it this morning after I spent a big time in the udev/hwdb documentation and tweaking :blobcat:
bluejorts@kolektiva.social
ohhhh, I'm gonna try this
bruno@bantu.social
that's so cool. I'm thinking about doing something like that for streaming
cursedartist@mastodon.uno
Oh this is so cool! Can I ask you which pen you're using on that Thinkpad?
davidrevoy
@cursedartist Thanks! Sure, from the top of my brain, it's a Wacom Bamboo Ink Plus, I detail it on https://www.davidrevoy.com/article972/my-solution-for-mobile-digital-painting-on-gnu-linux . Their naming convention is a bit confusing, they have many products named bamboo, and ink , this one is the one that has a built-in battery you can charge with Usb-C.
★gee
cooool, j'avais pas vu passer cet article 🙂
Moi j'utilise les touches les plus à droite de mon mini clavier MIDI (bon du coup je les ai pas décorées vu que ça me sert aussi de vrai clavier de piano, mais bon), avec un script qui map le signal MIDI vers une combinaison de touches reconnue dans Inkscape (annuler, changer d'outil, etc.).
3 ★rwdmiha@mastodon.social
Looks fantastic. Here in this country, I have never seen an inexpensive numpad in use. I only ever came across these in an online store, and they were nearly as pricey as standard keyboards.
https://slopegame.net
missishness_addict@mstdn.social
Your blog post made my old unused numpad become useful again! 😁 While looking more for how to convert numpad to a macro keyboard, I also found this way of doing it: https://github.com/jfedor2/hid-remapper
Basically it uses a Raspberry Pi Pico for the remapping. Helps very much if you need to have the numpad on a different computer but doesn't want to remap it on another computer!
★davidrevoy
@missishness_addict Thanks!
★And thank you for the link to this project. Very interesting method. I had no idea also how cheap and compact the PiPico was.
Post a reply
The comments are synchronised every 12h with the replies to this post on Mastodon:How to use this? (click here to unfold)
Open a new Mastodon account on the server of your choice. Then, Copy/Paste the adress above in your Mastodon 'Search' field. The post will appear and you'll be able to fully interact with it. You'll have full control of your posts: edit, remove, etc. After that, your message will appear here.
Just please note that it may take up to 12 hours for your changes to be reflected here.