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

learn more… | top users | synonyms

21
votes
1answer
1k 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 ...
113
votes
3answers
54k 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 ...
12
votes
2answers
836 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 ...
15
votes
3answers
4k 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 ...
27
votes
7answers
12k views

How do I get current keyboard layout?

I'm wondering is there any command line tool, that returns current keyboard layout. I have XkbLayout set to us, ru. Update: setxkbmap returns layout settings, not selected layout. E.g.: $ setxkbmap ...
9
votes
2answers
3k 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?
12
votes
3answers
2k 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?
10
votes
4answers
4k 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, ...
4
votes
2answers
1k 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 ...
2
votes
2answers
640 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 ...
17
votes
8answers
6k 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 ...
15
votes
1answer
876 views

Switch between numbers and symbols on caps lock

Is it possible to set caps lock to switch between inserting numbers and the symbols they normally trigger when one holds shift? e.g. when you normally press the 9 key, you get a ( unless caps lock is ...
9
votes
1answer
2k 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 ...
10
votes
4answers
3k views

Reassign Ctl and Alt keys - xmodmap 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 ...
8
votes
2answers
3k 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 = ...
7
votes
2answers
578 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 ...
6
votes
2answers
751 views

Share keyboard over network as separate device?

I am trying to achieve something similar to this: http://superuser.com/questions/67659/linux-share-keyboard-over-network The difference is that I need the remote keyboard to be usable separate from ...
9
votes
2answers
2k 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?
1
vote
3answers
2k 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 ...
5
votes
1answer
394 views

Swapping <esc> and <caps lock> in a way that persists with external keyboards

I have a file called ~/.speedswapper which contains the following: ! Swap caps lock and escape remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = Caps_Lock ...
3
votes
1answer
830 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, ...
1
vote
1answer
301 views

how to send keyboard signal using a shell script

I have an application in graphical interface that when I run it, it's not opened in full screen mode, but when I use the keyboard shortcut Alt+Ctrl+M , it becomes fullscreen, I want to change the ...
1
vote
1answer
543 views

Determining keycode assignments for X.org on a PC

At some point around late 2008 to early 2009, some keycode values (apparently, for the keys that weren't on an XT keyboard) on a standard PC keyboard when running X.org under Linux changed. I don't ...
11
votes
2answers
982 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 ...
9
votes
4answers
14k 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?
9
votes
1answer
2k views

Relationship of keyboard layout and xmodmap

I'm using Xubuntu. Before login I can choose a keyboard layout. I'm using xmodmap for remmaping some keys. I'm interested in two things: How the state of keyboard mapping changes when I turn the ...
9
votes
1answer
959 views

second keyboard to run commands

On my computer I have two USB keyboards plugged in. Instead of having both just type the same key, is it possible for a second keyboard to be setup to run commands instead of typing letters? And If ...
24
votes
6answers
16k 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, ...
16
votes
9answers
2k 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 ...
13
votes
3answers
1k 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
1answer
465 views

Get the keycode of a key, from a custom made keyboard

I'm trying to transform a Minitel to a computer with a Raspberry Pi. This is a minitel: So I soldered the matrix of the minitel keyboard to a usb keyboard pcb, like this: Everything is working ...
11
votes
2answers
3k views

What does raw/unraw keyboard mode mean?

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 ...
9
votes
4answers
808 views

How do I disable or change the caps lock key on my keyboard?

We have ergonomic keyboards at work which I'm not entirely used to. I seem to keep hitting the capslock key while I'm in vim and it's starting to annoy. How can I disable this key, and or change to to ...
7
votes
1answer
2k 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 ...
6
votes
2answers
2k views

Grub 'incompatible license' error

The other day, I was using a laptop for general desktop use when its keyboard began to act up. Most of the keys on the keyboard's right side stopped working entirely and key combinations such as Ctrlu ...
6
votes
1answer
312 views

Application-specific keymapping

In general, I want to make specific keymaps for application, that working only in it and doesn't affect any other app. For example, I already use my Caps key to toggle input language (via xorg.conf), ...
5
votes
3answers
971 views

How to set an xmodmap file for the session manager (or at least SLiM) because of a broken physical key

I've got my laptop set up to boot directly into SLiM as the X session manager. However, the "M" key on my laptop is broken. I've gotten around this when logged in by using xmodmap to remap my ...
4
votes
3answers
5k 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 ...
11
votes
5answers
2k views

Disable Keyboard & Mouse Temporarily

I would like to know how one can disable the keyboard & mouse temporarily in OS X.
8
votes
1answer
3k views

Enable num-lock as default in Linux

There has been a similar question - but IMHO there has to be a simpler solution. If num-lock is on in the BIOS - why is it turned off during linux boot and/or KDE/Gnome/whatever startup?
7
votes
2answers
1k views

Is it possible for a daemon (i.e. background) process to look for key-presses from a USB keyboard?

I'm working on an embedded Linux project where I will be developing a program that will run automatically on bootup and interact with the user via a character display and some sort of button array. ...
6
votes
1answer
77 views

How to make a key simulate another key?

In my keyboard the I key doesn't work. So, I use an on-screen keyboard. I'm using Ubuntu 13.04. But its hectic. Is there a way so that I can make another key (for example Home on my keypad) to behave ...
5
votes
3answers
569 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 ...
5
votes
3answers
5k views

Cannot pair my generic keyboard via automatic PIN

I am using Xubuntu, pure Xfce, 64-bit. The problem: I have tried 2 ways; both have failed for different reasons: (1) the commandline way (see below) fails because at no stage does it actually ask ...
4
votes
2answers
495 views

Disable the external keyboard from a script

I have a udev rule for my external keyboard. I can catch events, and by running a script I can also reach udev env variables. Can I disable keyboard with udev? Or must I use a script to disable the ...
4
votes
1answer
339 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 \ ...
4
votes
3answers
1k views

Set the key for spanish eñe letter

How can I map the spanish eñe letter to a key combination? What application is suitable for this purpose (xmodmap, xbindkeys, ...)? When I press Caps Lock + n, it should type ñ When I press Caps ...
2
votes
1answer
738 views

Control and up/down keys in terminal for use by emacs

Is it possible to use C-up and C-down when running emacs in the terminal window (when starting emacs from the command line with the -nw flag)? What should my terminal send when I press C-up and C-down ...
1
vote
1answer
56 views

Is bluetooth keyboard associated with `stdin`?

I know that keyboard is standard input and is referred by the stdin file. I sometimes use a Bluetooth(BT) keyboard when working on my laptop. Both keyboards, my laptop keyboard as well as the BT ...
1
vote
1answer
465 views

How do I set Keyboard and profile preferences when connecting to Solaris via SSH?

I'm connecting to a Solaris box from Mac OS X. Whenever I have connected to linux boxes in the past it has been much easier to navigate around. How do I fix these configuration issues on Solaris? ...