Libraryless. Click here for Pure Java version (10158L/63K).
1 | // On Linux Mint: Go to Keyboard settings instead, then Layouts / Options / Misc compatibility options => check "Num lock on: digits; ..." |
2 | svoid linux_fixNumPad() { |
3 | if (!isLinux()) ret; |
4 | File f = newFile("/etc/default/keyboard"); |
5 | S line = "XKBOPTIONS=\"numpad:microsoft\""; |
6 | S cmd = "echo " + platformQuote(line) + " >>" + platformQuote(f); |
7 | File cmdFile = javaxCachesDir("numpad.sh"); |
8 | saveTextFile(cmdFile, cmd); |
9 | makeExecutable(cmdFile); |
10 | backtickInSuperUserVM(platformQuote(cmdFile), true); |
11 | print("Fixed numpad for you (hopefully)! Please reboot machine for change to take effect."); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031213 |
Snippet name: | linux_fixNumPad - don't call more than once, it will clutter the file... |
Eternal ID of this version: | #1031213/12 |
Text MD5: | ae9fc21001551cab94ddddeef22a7971 |
Transpilation MD5: | 06b0506e8c7b93d2a4156910488da458 |
Author: | stefan |
Category: | javax / linux |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-24 15:34:53 |
Source code size: | 612 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 150 / 254 |
Version history: | 11 change(s) |
Referenced in: | [show references] |