Questions about how to run a program or other operating system function when a given combination of keys is pressed.

learn more… | top users | synonyms (2)

3
votes
2answers
165 views

Why do different terminals have different values for keys in the .inputrc file?

This question really started from here. I would like to know why different terminals like rxvt and xterm use different values when mapping key combinations? Whilst I am in rxvt or xterm how can I find ...
2
votes
1answer
676 views

Some keyboard shortcuts do not work in Compiz

I've bound Win-R with the Run Application dialog in Metacity. However, the shortcut doesn't work when switched to Compiz. The entry Show the panel's "Run application" dialog box even doesn't appear in ...
5
votes
2answers
427 views

Is it possible to stop emacs from down translating my key chords?

emacs has the default behaviour of double-guessing which key-combo (chord) I've pressed. It automatically down-translates to a lesser chord when the key-combo I pressed is unassigned, eg. ...
4
votes
1answer
804 views

Fetching user input while running in the background

I am writing a script that prompts the user for input and does some processing afterwards. I was using read to get the data, but then I noticed that when the script is ran with a keyboard shortcut (I ...
3
votes
0answers
422 views

How to map a complex multi-key combination into a shortcut to execute a process, in X (across WMs etc)?

I am wondering how can I make a complex multi-key combination like say, Ctrl+Alt+T into a shortcut to execute me a process,xterm for instance? The important caveat is that I want it wired into either ...
4
votes
1answer
763 views

Custom hotkeys in dwm

I'm trying to create an array of simple hotkeys on my desktop, running OpenSuse with dwm. Things like: Ctrl+E /opt/eclipse/eclipse Can this be configured from within dwm? If not is there an ...
9
votes
1answer
878 views

How can I change the behavior of hotkeys in xmonad if the program is running?

I'm using a few key mappings in my xmonad.hs configuration file: ... , modMask = mod4Mask -- Rebind Mod to the Windows key ... [ ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s") , ...
4
votes
3answers
4k views

How to redefine kde4 keyboard shortcuts

I recently switched to using KDE 4, and I don't like that KDE uses so many of the Ctrl-Fn shortcut keys, since I use them for other purposes. Specifically, I'd like to disable the Ctrl-F4 shortcut in ...
1
vote
2answers
2k views

Meta key does not open “Activities” menu in Gnome 3

I've started using the Gnome 3 packages that just came through the Debian testing repositories, and encountered a problem. Hitting the Super/Meta/Windows key would not open "Activities" menu. Other ...
2
votes
2answers
955 views

Global keyboard shortcut (inittab?)

Is it possible to create a keyboard shortcut that will run: shutdown -h now When I press Ctrl + 9, for example.
4
votes
1answer
924 views

How to set up backspace to go up instead of back in Thunar?

I'd like pressing backspace to step one level up (outside) in a directory hierarchy instead of going to the previous opened location. How to configure this in Thunar?
5
votes
2answers
1k views

How to switch X windows from the command-line?

How can I create a script that automatically switches windows? I'm trying to do the same thing Alt+Tab does.
1
vote
2answers
622 views

What does pressing Alt+Shift+3 do in Terminal?

What does pressing Alt + Shift + 3 in Terminal do? All I can see is that it prints a pound sign and jumps to the next line, but, supposedly, it does something special.
6
votes
1answer
152 views

How do I find out what action or command or script is assigned to a hardware button?

I'm trying to assign a correct rotation on my tablet. http://superuser.com/questions/340516/assigning-a-rotation-script-to-a-hardware-button One way to do this is using gnome keyboard shortcuts. ...
11
votes
1answer
1k views

Gnome stop grabbing my emacs keys

I am using Gnome in Ubuntu 11.04. I work a lot in Emacs, and I find that the Gnome window manager grabs some of the Emacs keys. To some extent, I can stop this by laboriously going through each of ...
2
votes
0answers
107 views

Use the system Compose database in Gtk applications [duplicate]

I'm using a X server which doesn't implement the XKB extension (it is VNC, but I don't think it matters, my vncviewer is running on Windows XP, I don't think it matters either). I've set up a ...
5
votes
3answers
1k views

How can I reset all the bind keys in my Bash?

I bound some keys by mistake, and they don't work any more, such as HOME, END, UP, DOWN, LEFT, RIGHT. Is there a way to reset all the bound keys to their original state?
3
votes
4answers
2k views

Home key not working in terminal

I am using GNOME Terminal 2.7.3 and zsh 4.3.9 (x86_64-unknown-linux-gnu) Home and End are not working. Nothing happens and nothing gets displayed when I press them. but they work when I press shift + ...
9
votes
2answers
364 views

Weird control-d behavior

I can use cat as a very simple text editor by doing cat > foo.txt. If I then type: bar baz and then press ctrl+D, it now looks like this: $ cat > foo.txt bar baz^D with the cursor at the ...
6
votes
4answers
6k views

Ctrl+C does not work in gnome-terminal

On my Linux host, Ctrl+C does not seem to work and I do not know how to proceed to make it work. I am using Ubuntu 10.04 with bash 4.1.5(1), and working in Gnome-terminal. When I pressed Ctrl+C while ...
4
votes
1answer
920 views

How I can get keycode and make multimedia keys usable?

I've an Asus N73S which have non-functional multimedia keys. I have "direct access" keys but also "indirect access" keys (via Fn + ...). The "Windows" key doesn't work either. These keys don't ...
2
votes
1answer
466 views

Disable action keys

I'm running openSUSE on HP Pavilion dm4. I have a bunch of action keys (volume up/down, brightness, wifi etc.) on my function keys. For using standard Fx keys I have to hold Fn key. The problem is ...
10
votes
2answers
2k views

Select code block in vim

Given a code like this: 588 while ($linecounter > 0) { 589 $token = " "; 590 while ($token != PHP_EOL) { 591 if (fseek($handle, $pos, SEEK_END) == ...
3
votes
2answers
392 views

Bash: keybinding/trap issue

My .bashrc has the following: # Alt+L lists current directory bind -x "\"\el\":ls -ltrF --color=auto;" # trap commands and echo them to xterm titlebar. trap 'echo -ne "\033]0;$BASH_COMMAND - ...
4
votes
1answer
460 views

In emacs, how can I pass an argument to a function in a keybinding defintion

I want to create a keybinding for funcion end-of-line+ and pass a value of -1 to i. The function is declared as: (end-of-line+ &optional n) The first of the following snippets below, works ...
3
votes
0answers
138 views

How can I prevent Control+Alt+D from logging me out (of Gnome 2.22 on Debian 5)?

I was using Emacs, and typed Control+Alt+D in order to run Emacs' "down-list" command. I was dismayed to see, however, that I was instantly logged out; I assume this is some Gnome keyboard shortcut. ...
61
votes
13answers
39k views

Getting tmux to copy a buffer to the clipboard

I am trying to figure out a decent way to copy what I have in a tmux buffer into my clipboard. I have tried a couple of different things like bind-key p select-pane -t 2 \; split-window 'xsel -i ...
8
votes
2answers
3k views

how to close all panes but the current pane in tmux

I have a key bound to setup panes to my liking, but sometimes things get messed up or out of hand and I want to close all the panes and rerun the script. Is there a simple tmux command to close all ...
4
votes
2answers
6k views

How to map ALT key in .vimrc?

In order to be able add blank lines without going into insertion mode, I'm trying to map ALT-o and ALT-O to o<ESC> and o<ESC> I've tried the following in my .vimrc map <M-o> ...
2
votes
1answer
592 views

Tutorial about key maping in KSH in EMACS mode

Are there any good tutorial to learn about Key Maping in Korn Shell (AIX) in EMACS mode ?
12
votes
4answers
564 views

Is there a vim shortcut for <name of current file>?

In vim, if I'm working on a Python script, I will commonly type: :! python this_script.py to execute the script. Is there a shortcut for the name of the current file? If not, can I easily make one? ...
5
votes
2answers
276 views

Can I set a gnome keyboard shortcut to be a prefix key, like in emacs, tmux or screen?

I would like to setup some Gnome keyboard shortcuts to be a prefix-key, so that I can add several shortcuts with the same prefix. Eg. I'd like to be able to have Super+x be a prefix key, with the ...
11
votes
2answers
4k views

In GNOME 3, how does one assign keyboard shortcuts for applications besides the default applications?

In GNOME 3, there's a facility to assign keyboard shortcuts for applications like your default browser, default email client, default terminal etc. How do I do this for other applications?
9
votes
1answer
2k views

Terminator: Shortcuts for Prev and Next?

In terminator, the keyboard shortcut Ctrl+Shift+F opens up a small bar at the bottom of the window to let the user search a text string within the terminal scrollback. Are there any keyboard ...
4
votes
1answer
769 views

How to execute shortcut keys from command line?

I am running Gnome. I would like to execute a shortcut key combination from the command line. For example, type a command that generates the key codes for Ctrl+Alt+Left. Does anyone know of a way to ...
11
votes
3answers
2k views

Yanking URLs in w3m

I have been using w3m for a couple of weeks and am convinced that it is my preferred text browser - with one exception. Is there any way to yank URLs to the clipboard without using the mouse? I have ...
5
votes
2answers
2k views

Working with screen and emacs

I'm working with emacs (on the terminal) and I use screen to switch between terminals. The key combination Ctrl+A is grabbed by screen. Is there a way to change screen key binding?
1
vote
1answer
280 views

erratic keyboard shortcut behavior - gnome debian testing

Sometimes my keyboard shortcuts in gnome do not work (ctrl-alt-right for next desktop, ctrl-alt-m for menu, ctrl-alt-b for browser, et cetera) Sometimes after rebooting they do work. I wish I ...
47
votes
4answers
11k views

Pasting X selection (not clipboard contents) with keyboard

I'd like to be able to paste the X selection using the keyboard. Currently I have to use the middle mouse button to do this. I gather that faking a middle mouse button press is fairly easy to do, ...
3
votes
2answers
593 views

Why does US International Keyboard break Alt_R

All adding the U.S. English International (with dead keys) keyboard layout breaks my Alt_R key. Any ideas why? I'm working on RHEL 5.5 using GNOME. The problem disappears if I remove the additional ...
2
votes
3answers
1k views

How to disable “Resize Window” shortcut (Alt-F8)?

I disabled this shortcut it via System->Preferences->Keyboard Shortcuts, but it still persists. Furthermore, it takes precedence over Alt-F8 in other apps. How do I really disable this shortcut? Do I ...
4
votes
1answer
690 views

Reverse control-code look up for terminals

My understanding is that terminals often use ANSI control-codes to represent non-alphanumeric character sequences. For example, when editing .inputrc for Bash in Linux, it's easy to find code ...
11
votes
2answers
4k 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?
11
votes
2answers
4k views

How to change previous/next word shortcut in bash?

How do I configure Ctrl-Left and Ctrl-Right as previous/next word shortcuts for bash (currently alt-b and alt-f)?
4
votes
5answers
482 views

Can I change a shortcut key to Windows key?

I'm trying to change the shortcut key for "Run Application" ( Alt+F2 ) to the Windows key. When I click "Show the panel's Run application dialog box" in Keyboard Shorcuts, it says "New Shortcut", ...
7
votes
2answers
2k views

Adding Ctrl-L as “clear” hotkey in OpenBSD's ksh

I've been looking for a way to use Ctrl-L to clear the monitor instead of typing clear in each time. I found nothing except a patch which didn't work for me. How do I add hotkeys/shortcuts to my ...
5
votes
1answer
353 views

Enable kill X.org with an own key combination

I've just read Enable kill X.org with ctrl+alt+backspace and am really happy, that control-alt-backspace no longer kills my X-Server. However, I'd like to have a way to kill it; it just should be ...
4
votes
2answers
426 views

Jump to start of the line in Bash's Vi mode

I'm using Bash Vi mode (aka set -o vi). Still I miss the Ctrl-A shortcut from Emacs mode, which is very handy. Many times I'm retrieving the last command and append an echo to the beginning of the ...
4
votes
1answer
389 views

In Gnu Emacs how do I set up a global key to toggle the menu-bar?

Using Gnu Emacs 23.1.1 on Ubuntu 10.04... I'm currently a total newb with emacs, and I've decided to go cold turkey with the Gnome menu bar. (but I do want it to be "available" for the teething ...
12
votes
2answers
3k views

Can less invoke vim instead of the default vi when I hit the 'v' key?

I want to launch vim instead of the default vi editor when I hit v in less. Are there any settings I can modify to allow me to do this?