Questions tagged [keyboard]

General keyboard topics, including keyboard hardware and keyboard functionality in software.

Filter by
Sorted by
Tagged with
84
votes
2answers
20k views

How do keyboard input and text output work?

Suppose I press the A key in a text editor and this inserts the character a in the document and displays it on the screen. I know the editor application isn't directly communicating with the hardware (...
20
votes
3answers
3k views

Manipulating X key and pointer grabs on the command line

What command line tools exist to list and manage X server grabs? (That's grab as in key and pointer grabs, i.e. restricting the use of a particular key or mouse button to a particular application, or ...
718
votes
2answers
408k views

How to unfreeze after accidentally pressing Ctrl-S in a terminal?

It's a situation that has happened quite often to me: after I press (with a different intention) Ctrl-S in a terminal, the interaction (input or output) with it is frozen. It's probably a kind of "...
7
votes
1answer
1k views

^@ spam in tty (but seems to be system-wide)

I recently noticed some weird behavior on my GNU/Linux machine. I've been trying to narrow it down but I am unsure where to go next. My setup uses the following: i3 gdm arch systemd grub2 pulseaudio ...
21
votes
1answer
4k views

Can one PC be used by two users at the same time via dual-monitor?

Since modern PCs can use two screens at the same time I wonder if it is possible to plug in two keyboards and mouses as well to have the two screens run two (more or less) independent X-sessions at ...
18
votes
2answers
12k views

Mapping key combination with xmodmap

I'm trying to achieve the following mapping keycode 135 = <Ctrl-C> Is it possible to achieve this in some way?
18
votes
1answer
6k views

keyboard hard remap keys?

I am trying to find a way to remap keyboard keys forcefully. I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/...
27
votes
4answers
57k views

How to inject keystrokes via a shell script?

I'm trying to inject keystrokes into the input daemon so as to simulate typing from a Bash script. Is this possible, and if so, how can I make it happen?
16
votes
4answers
20k views

key bindings table?

Do we have a key bindings table that translates all the various ways of referring to a key press? I'm using zsh, but I presume that if there was such a table it would work for any shell. The reason I ...
25
votes
4answers
16k views

How to fix Ctrl + arrows in Vim?

I am using Putty -> Suse box -> vim 7.2 combo for editing and want to remap Ctrl + arrows combo to a particular task. But for some reason, Vim ignores the shortcut and goes into insert mode and ...
10
votes
1answer
14k views

How to disable keyboard?

Without unplugging my keyboard I'd like to disable it from the terminal; I was hoping that this could be done using rmmod but based on my currently loaded modules it doesn't look like it is possible. ...
76
votes
6answers
121k views

How to get keycodes for xmodmap?

I'm trying to use xmodmap to remap Alt / Super keys on Dell L100 keyboard, and have trouble getting the keycodes. For instance, using xev doesn't give me keycode for Alt FocusOut event, serial 36, ...
38
votes
1answer
2k views

What happens when Ctrl + Alt + F<Num> is pressed?

I am looking for an explanation of what happens in Linux when this key combination is pressed to change the current terminal. In particular, what software component intercepts this key combination and ...
26
votes
3answers
8k views

How can I keep control+d from disconnecting my session?

I regularly ssh to a centos 5 box. Somehow they keys are mapped so that control+d will log me out of my current shell. If I am sudo'ed to another use it puts me back to the previous user. If I am not ...
11
votes
4answers
12k views

Why is the US international keyboard layout on Debian different?

Edit: I realized that the "problem" was not only in Ubuntu but in Debian itself and Ubuntu just inherited it, so I had this migrated from Ask Ubuntu I have been using Linux on and off for 10 years, ...
8
votes
3answers
5k views

Remapping caps-lock to escape, and menu to compose, on the linux console

When running X I use a .xmodmaprc to remap certain keys thusly: ! Make it so that both Caps Lock and Escape do Escape clear Lock keysym Caps_Lock = Escape ! Remap the menu key as Compose keysym Menu =...
4
votes
2answers
3k views

Key mappings in Linux

What do people mean when they point out that the "keys are not properly mapped" in a Linux installation when working on the command line? Isn't the default installation OK? What extra/specific ...
28
votes
8answers
18k views

Disable Keyboard & Mouse input on unix (under X)

How can one programmatically "freeze" the Keyboard & Mouse temporarily, so that no one could mess with the system? There are several possibilities where this is useful. For instance, I have a ...
31
votes
7answers
27k views

Is there any reason why I get ^[[A when I press up arrow at the console login screen?

Whenever I'm at the console login, I press up arrow intentionally to see the previously typed commands. But I see this ^[[A. But when I press Ctrl Alt Print Screen Scroll Lock Pause Break Page Up ...
5
votes
1answer
235 views

How to make a comprehensive set of possibilities for defining GNU-screen “command characters”?

I want to somehow generate a comprehensive "menu" of all possible ways to set up the GNU-screen "command characters" for a standard, off-the-shelf "US keyboard" and a specific terminal emulator, say ...
2
votes
1answer
846 views

Changing the keyboard layout/mapping on both the console (tty) and X in an X/console agnostic way?

I've been able to change the keyboard layout/mapping when the X Window System is running using ~/.Xmodmap (and I suppose you could also do it through the X protocol directly, eg. using libxcb as a ...
4
votes
1answer
2k views

sysrq won't reboot with a keystroke, but will with echo “b” > /proc/sysrq-trigger

CentOS 6.2, 2.6.32-220.el6.x86_64 laptop. SysRQ is enabled for keyboard input, as is witnessed by: $ cat /proc/sys/kernel/sysrq 1 Common Magic SysRQ Keys are working such as alt-sysrq-h. However, ...
2
votes
2answers
440 views

swapping keys in a virtual terminal

Note: I asked this question in superuser about a month ago, but there hasn't been a reply till then, and the question relates to linux, so I'm posting it here. I want to swap esc and caps_lock keys ...
135
votes
4answers
43k views

What is the point of Ctrl-S?

Ctrl+S stops all output to the terminal which can be restarted with Ctrl+Q. But, why does Ctrl+S exist in the first place? What problem was trying to be solved by putting that control sequence in ...
31
votes
2answers
14k views

Record every keystroke and store in a file

I need to record every keystroke and store in a file in the user directory ~, when using my account, I am not sudoer and I cannot install programs (like logKeys) in any way. How could I do so using ...
25
votes
3answers
18k views

Adjusting keyboard sensitivity in a command line terminal?

When using a tty login shell by entering Ctrl-Alt-F1 from an Ubuntu 12.04 install on a laptop the keyboard seems overly sensitive and if my finger lingers for a moment on a button I end up with ...
17
votes
5answers
7k views

Remap CapsLock to Escape and Control System Wide

Is it possible to remap the CapsLock key system wide such that when the CapsLock button is pressed by itself it acts as the escape key and when pressed with another key it acts as the control key?
29
votes
13answers
12k views

Keep NumLock always on

I have standard keyboard with numerical keys on the right side (I guess it's called 104-key keyboard). I want to use the numerical keys only as numerical keys. That means, I don't want the NumLock to ...
27
votes
2answers
10k views

What is raw keyboard mode?

In the magic sysrq key combinations, there is the combination alt+sysrq+r which, according to wikipedia, does the following: Switch the keyboard from raw mode, the mode used by programs such as ...
13
votes
4answers
7k views

Reassign Ctrl and Alt keys - xmodmap 'BadValue' error

I am attempting to remap my keyboard in order to make emacs usable. My ergonomic keyboard puts its single Control key in an isolated 4-key island way off to the left. The OS is Debian squeeze. Here ...
3
votes
1answer
1k views

Mapping key bindings

Background: I got an Acer Chromebook yesterday and I am running Ubuntu on it (I am also somewhat new to Linux). The keyboard does not have dedicated Home and End buttons since in ChromeOS there are ...
5
votes
1answer
5k views

Linux alternative to alt+numpad codes

I sometimes need to type "alt codes" to get symbols and on linux, it can be inefficient to use shift+ctrl+u then type the code, for example shift+ctrl+u+00a7 for § when on Windows it's alt+21. So ...
0
votes
1answer
168 views

Problem in identifying key that causes random character in terminal

I have kali linux on my laptop.I have a problem with my keyboard . Whenever i open a terminal some key is pressed automatically and ^[[5~ this character is shown in terminal. Please tell me which key ...
49
votes
5answers
37k views

List all valid kbd layouts, variants and toggle options (to use with setxkbmap)

Is there a way from command line to retrieve the list of all available keyboard layouts and relative variants? I need to list all the valid layout/variants choices to be used then from setxkbmap. ...
28
votes
3answers
12k views

What is the Mode_switch modifier for?

Playing with xmodmap I encountered a modifier key I hadn't heard of: Mode_switch. It seems to have something to do with inserting special characters. I assigned it to a key but it seems to have no ...
14
votes
1answer
18k views

How to get all my keys to send keycodes

I'm using Gentoo with XFCE. I have a logitech K350 keyboard, all but a few of the keys work as expected but there is one specific key that I want to use but when I run showkey no key codes are being ...
12
votes
4answers
20k views

How do I change currently selected keyboard layout from command line?

I have my keyboard layouts (two of them) and switching between them configured via the following command: setxkbmap -layout us,ru -option -option "grp:lctrl_lshift_toggle,ctrl:nocaps" Now I want to ...
26
votes
1answer
44k views

monitoring events (keyboard, mouse) in X

Is it possible to display all events that are generated in Xorg? Such as keyboard pressed, mouse events...?
9
votes
1answer
3k views

Create and set custom keyboard layout

I want to create and set a custom keyboard layout with setxkbmap. I created a file in ~/.xkb/prog with this content: partial default alphanumeric_keys xkb_symbols "basic" { include "latin(type4)" ...
11
votes
2answers
2k views

UTF8 math symbols & keyboard layout / input

I'd like to use UTF8 math symbols, when typing one list, another list. I've found something called ComposeKey. Unfortunately it's not covering omega, theta, right arrow etc. I am using KDE, I've ...
10
votes
3answers
1k views

Turn off Caps lock when Escape is pressed

Is there any way to disable CapsLock whenever Esc is pressed. Yes, I use VIM! I actually have an alternative all-caps keyboard layout on Ctrl-6 but I find it cumbersome and would prefer to just have ...
17
votes
2answers
7k views

Map “windows” key on keyboard to “ctrl”

I am on Ubuntu and using a Microsoft keyboard. I want to map my Win key to a Ctrl key. How can I do that?
13
votes
2answers
3k views

Custom xkb layout in which one key creates two unicode code points

I am writing a new custom keyboard layout for Xorg, but there is one particular glyph which does not exist in Unicode. It is, however, easy to create it by using a standard letter plus a combining ...
9
votes
2answers
5k views

Remapping Caps Lock with xmodmap doesn't work

When I program I like to swap these keys: Esc ↔ Tab Ctrl ↔ CapsLock In ~/.xmodmap, I have specified these re-mappings: keycode 66 = Control_L keycode 37 = Caps_Lock keycode 23 = Escape keycode 9 = ...
5
votes
1answer
6k views

How to detect global key presses

I have an Asus laptop that has a special key that can be configured to launch any software (at least on Windows). The general question is: how can I detect any key press (globally)? Then, how ...
8
votes
2answers
3k views

Share keyboard over network as separate device?

I am trying to achieve something similar to this: https://superuser.com/questions/67659/linux-share-keyboard-over-network The difference is that I need the remote keyboard to be usable separate from ...
7
votes
1answer
3k views

Map Super+[Left|Right] to Home/End

How do I map key "Super" so, when combined with Left/Right, it produces keycode Home/End? My current setxkbmap: setxkbmap \ -model pc105 \ -layout 'us(dvorak-intl),us(alt-intl)' \ -option \ -...
6
votes
1answer
2k views

How to disable laptop keyboard on plugging in a USB keyboard?

I use my USB keyboard in home and now I want disable the laptop keyboard on plug of this keyboard. How could I achieve this? I use ArchLinux and DWM. ps: i found my device and in udev disable it ...
5
votes
1answer
534 views

Disable keyboard but still allow reading from it

I have a USB numpad that I want to use to control a specific application running as a daemon in the background. The daemon is written in Python and I'm currently reading input using python-evdev which ...
2
votes
3answers
21k views

How can I set the keyboard right on X?

Note: forked of this per recommendation here. I made a foolish typo for UTF-8, and expected that when I fixed it, the keyboard on X would work right. Since making this errant change, I was no longer ...