墨香年少 32 发布于 2021年3月31日 tmp sln: xinput list 列出列表,找到自带键盘的id 然后执行 xinput set-prop id "Device Enabled" 0 我的电脑自带键盘id为14:,所以如图: this sln is tmp,if you reboot your conputer , you must do this again. so, if you want do something once, your keyboard disable for ever,read this: 打开终端并运行以下命令 $sudo gedit /etc/default/grub 找到以下行 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 添加参数i8042.nokbd,上面的行应该是这样的 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nokbd" 按以下命令更新grub $sudo update-grub 然后reboot你的笔记本电脑 1 目之所及,皆是回忆,心之所想,皆是过往 分享这篇帖子 链接帖子 分享到其他站点
墨香年少 32 发布于 2021年4月1日 or: xinput disable "AT Translated Set 2 keyboard" 目之所及,皆是回忆,心之所想,皆是过往 分享这篇帖子 链接帖子 分享到其他站点
墨香年少 32 发布于 2021年4月1日 尝试运行xmodmap -e 'keycode 24='以仅禁用Q键。如果可行,您可以将其添加到~/.bashrc或全局/etc/bash.bashrc文件中。 Q: How can I disable one or several keys on my laptop keyboard in Linux? When I press the DELETE key, it gets stuck and deletes everything A: No problem! You can use the following command to remap or disable any key of your keyboard: xmodmap -e 'keycode <value>=<action>' For example, you could run the following command to disable your DELETE key: xmodmap -e 'keycode 107=' How to get the correct keycode You can get the keycode that corresponds to a specific keyboard button in one of two ways. The first method is by using the simple command xev. xev opens a window and then monitors “events” such as keystrokes. It is suitable when you are running a GUI. The second method, which can be run with only the console, is showkey. This command will monitor for keystrokes for 10 seconds, or until a SIGTERM signal is received. List of all keycodes The full list of available keycodes and actions assigned to them on UK keyboard is below… keycode 8 = keycode 9 = Escape keycode 10 = 1 exclam keycode 11 = 2 quotedbl keycode 12 = 3 sterling keycode 13 = 4 dollar keycode 14 = 5 percent keycode 15 = 6 asciicircum keycode 16 = 7 ampersand keycode 17 = 8 asterisk keycode 18 = 9 parenleft keycode 19 = 0 parenright keycode 20 = minus underscore keycode 21 = equal plus keycode 22 = Delete keycode 23 = Tab keycode 24 = Q keycode 25 = W keycode 26 = E keycode 27 = R keycode 28 = T keycode 29 = Y keycode 30 = U keycode 31 = I keycode 32 = O keycode 33 = P keycode 34 = bracketleft braceleft keycode 35 = bracketright braceright keycode 36 = Return keycode 37 = Control_L keycode 38 = A keycode 39 = S keycode 40 = D keycode 41 = F keycode 42 = G keycode 43 = H keycode 44 = J keycode 45 = K keycode 46 = L keycode 47 = semicolon colon keycode 48 = apostrophe at keycode 49 = grave asciitilde keycode 50 = Shift_L keycode 51 = numbersign asciitilde keycode 52 = Z keycode 53 = X keycode 54 = C keycode 55 = V keycode 56 = B keycode 57 = N keycode 58 = M keycode 59 = comma less keycode 60 = period greater keycode 61 = slash question keycode 62 = Shift_R keycode 63 = KP_Multiply keycode 64 = Alt_L keycode 65 = space keycode 66 = Caps_Lock keycode 67 = F1 keycode 68 = F2 keycode 69 = F3 keycode 70 = F4 keycode 71 = F5 keycode 72 = F6 keycode 73 = F7 keycode 74 = F8 keycode 75 = F9 keycode 76 = F10 keycode 77 = Num_Lock keycode 78 = Scroll_Lock keycode 79 = Home KP_7 KP_7 Home keycode 80 = Up KP_8 KP_8 Up keycode 81 = Prior KP_9 KP_9 Prior keycode 82 = KP_Subtract keycode 83 = Left KP_4 KP_4 Left keycode 84 = Begin KP_5 KP_5 Begin keycode 85 = Right KP_6 KP_6 Right keycode 86 = KP_Add keycode 87 = End KP_1 KP_1 End keycode 88 = Down KP_2 KP_2 Down keycode 89 = Next KP_3 KP_3 Next keycode 90 = Insert KP_0 KP_0 Insert keycode 91 = Delete KP_Decimal KP_Decimal Delete keycode 92 = 0x1007ff00 keycode 93 = keycode 94 = backslash bar keycode 95 = F11 keycode 96 = F12 keycode 97 = Home keycode 98 = Up keycode 99 = Prior keycode 100 = Left keycode 101 = Begin keycode 102 = Right keycode 103 = End keycode 104 = Down keycode 105 = Next keycode 106 = Insert keycode 107 = Delete keycode 108 = KP_Enter keycode 109 = Control_R keycode 110 = Pause keycode 111 = Print keycode 112 = KP_Divide keycode 113 = Mode_switch keycode 114 = Break 目之所及,皆是回忆,心之所想,皆是过往 分享这篇帖子 链接帖子 分享到其他站点