Libraryless. Click here for Pure Java version (10158L/63K).
// On Linux Mint: Go to Keyboard settings instead, then Layouts / Options / Misc compatibility options => check "Num lock on: digits; ..." svoid linux_fixNumPad() { if (!isLinux()) ret; File f = newFile("/etc/default/keyboard"); S line = "XKBOPTIONS=\"numpad:microsoft\""; S cmd = "echo " + platformQuote(line) + " >>" + platformQuote(f); File cmdFile = javaxCachesDir("numpad.sh"); saveTextFile(cmdFile, cmd); makeExecutable(cmdFile); backtickInSuperUserVM(platformQuote(cmdFile), true); print("Fixed numpad for you (hopefully)! Please reboot machine for change to take effect."); }
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: | 151 / 254 |
Version history: | 11 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1031214 - linux_fixNumPad - doesn't work like this because we can't read the file as non-root |