I'm using MacOs with a Logitech ergo k860, which has a "print screen" button. Since is very near to the backspace button I'm often pressing it by mistake. Is it possible to tell MacOS to ignore the signal that is sent from the keyboard?
2 Answers
You can use hidutil
to remap the PrtScr to something else.
I wrote a very similar answer and provided a shell script that simplifies this command. You can copy and paste to your system. You just need to change the SOURCE and DESTINATION variables. For this, you’ll need the hex values of the keys to be remapped. I’ve provided them below:
- PrtScr = 46
- Backspace = 2A
(These are just the last 2 digits of the hex value for simplicity: i.e. 0x700000046)
Just replace the Print Screen key another Backspace key and when you press it (incorrectly), will be like Backspace was pressed instead. Alternatively, you can set it to the Null value (00) to make it do nothing.
-
Not exactly a drop-in solution. I suppose you're alluding to something like this which is not formatted correctly: hidutil property --set '{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc":0x70000002A, "HIDKeyboardModifierMappingDst":0x700000046}]}}'. Hard to know if I'm mapping my backspace to print screen or vice versa.... Commented Jun 8, 2023 at 23:36
-
Thanks for this answer. I will soon dig into it to see if it helps me answer apple.stackexchange.com/questions/461781/….– RyanCommented Jul 5, 2023 at 17:02
-
FYI, that comment is backwards, and turns the backspace key into something else.– dgatwoodCommented Dec 6, 2023 at 0:55
Alternately, if you install Logitech Options+, you can just map the Print Screen key to execute no action.