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 (1)

11
votes
2answers
3k 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)?
16
votes
1answer
560 views

Shortcut keys that are independent to keyboard layout

Is there a way to define an association of a particular physical key of the keyboard to some action, independently of the letter that this key is associated to in any layout? Example: In most ...
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?
2
votes
1answer
874 views

Cut + Copy + Paste in Linux Puppy Wary

Trying to cut + copy + paste from the standard urxvt shell in Puppy Linux Wary 5.3. If I follow this post on http://crunchbang.org/forums/viewtopic.php?id=15085 and I press: in urxvt: ctrl + ...
42
votes
12answers
26k 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 ...
31
votes
2answers
7k 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, ...
21
votes
4answers
6k views

How to enable killing Xorg with Ctrl+Alt+Backspace

I don't remember why they did this, but at one point X.org decided that disabling CtrlAltBackspace to kill it was a good idea. I know there's a way to re-enable it but I don't remember how. Can ...
10
votes
2answers
2k views

What is meant by a shell is in “vi” mode or “emacs” mode?

This question follows directly from the answer to one of my previous questions here. I am newbie to unix world and this site has helped a lot to understand some core concepts. In this case I am ...
5
votes
4answers
4k 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 ...
24
votes
3answers
7k views

Shell: how to go to the beginning of line when you are inside a screen?

I am inside a screen (screen -Ra). I have a long command, and I am at the end. Instead of keeping the left arrow, how can you go to the beginning of the line? CTRL-A works when I am in a normal ...
9
votes
3answers
1k 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 ...
1
vote
1answer
281 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
97 views

Associating a function in Emacs after looking up the code with M-x describe-key

I would like to associate the following function (which toggles on and off full-screen on the active buffer): (defun toggle-maximize-buffer () "Maximize buffer" (interactive) (if (= 1 (length ...
0
votes
2answers
65 views

How to catch keystrokes in Linux environment

I need a C code to be executed when some particular keys are pressed in Linux "Desktop" environment. What are the ways to register for such an event and How? Should I write ISR for that? I need an ...
22
votes
5answers
15k 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, ...
15
votes
4answers
5k views

How to get vim to work with tmux properly?

I'm trying to figure out how to get vim and tmux play together. My problem is: When I use xterm-256color I get vim to work nicely, but the background doesn't render properly. I fixed this by using ...
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 ...
10
votes
4answers
22k views

How do I quit from Vi?

I started Vi on my Ubuntu machine. However I don't know Vi, and now I can not quit. I see the editor and I can write text, at the bottom line there is a label "recording". How do I quit from Vi?
7
votes
1answer
6k views

How to close any window in Awesome WM?

The shortcut to close individual applications completely depends on the application developer. Some examples: Ctrl-q for Firefox Meta-F4 for Chromium Ctrl-Shift-q for GNOME Shell To close ...
6
votes
1answer
304 views

Emacs commands in xterm

I found that the commands I used to use in gnome-terminal, those I learned in Emacs, are only partially working in xterm. In some cases, I get strange chars like ÿ, æ, and â instead. Do you know how ...
5
votes
3answers
772 views

tmux after start

Can I configure tmux so it will after running tmux automatically opens two windows named src and cmd? I always type after starting it: prefix + c, prefix + ,srcENTER prefix + c, prefix + ,cmdENTER ...
11
votes
4answers
429 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? ...
9
votes
2answers
692 views

Alt-Left to skip words does not work in terminal emulators

On a Debian Wheezy machine at previous job, I got used to Alt+Left and Alt+Right to skip between words on active command-line (in bash). However, since at home I have upgraded to Jessie (Debian 8.0, ...
4
votes
1answer
317 views

How to bind 'tab' and 'shift+tab' in gnu screen?

As the title says, how do I bind the keys 'tab' and 'shift+tab' in screen? My problem is that I don't know what to pass to the screen command "bind" to designate these keystrokes. BTW, I'm aware of ...
4
votes
1answer
320 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
2k views

Bash: How do I move my cursor to the left a word-at-a-time?

In OSX I can just hold down the option key and press the left cursor key until I get to the word I need to edit (or in Vi I can just hit b, but I haven't been able to figure out how to do this in ...
3
votes
1answer
215 views

Configuring shortcuts for Sakura

I am massively confused by the sakura terminal emulator's .conf file. I want to make Alt+; open a new tab and Alt+: close a tab. I have tried: add_tab_key=alt+; add_tab_key=alt-; add_tab_key=; None ...
3
votes
2answers
1k views

How can I assign a keyboard shortcut to a specific application in Openbox?

I use the web browser Uzbl and the window manager Openbox, and I wondered if I could configure openbox to add a keyboard shortcut to minimize / maximize Uzbl's window ...
7
votes
2answers
8k views

Xfce 4: Change global keyboard shortcuts

I use Alt+Space in Emacs, but in Xfce it pops up window manager menu at the upper left corner of a window. How do i disable Alt+Space for Xfce and change global keyboard shortcuts in general?
7
votes
2answers
3k views

What is bash's meta key?

I tried to use xmodmap to map META_L to the MENU key but it doesn't seem to be accepted by bash as the meta key. So, I am wondering how these components (keyboard, X, xterm, bash) relate to each in ...
5
votes
1answer
667 views

Return to X session after Ctrl+Alt+F1

What is the command to return to the graphical desktop after entering the terminal mode with Ctrl+Alt+F1? I need it for operating my Raspbian.
5
votes
1answer
933 views

Keyboard shortcut to copy current command from terminal to clipboard [duplicate]

Is there any way to copy current command (line typed in bash prompt) in terminal to X-clipboard without involving a mouse?
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.
4
votes
1answer
61 views

Shortcut to google selected text

Is there a way to customize evince to search on Google a selected phrase? Like in Firefox where I select a text and right-click--> "Search Google for ..." If evince isn't customizable, is there any ...
4
votes
2answers
91 views

Where does the yanked text on commadline get stored?

When you delete characters on the command line using readline commands (e.g. Ctrl-U, you can paste using Ctrl-y, but where does it get stored? It does not seem to use X11 clipboard at all.
3
votes
3answers
63 views

confusing behavior of emacs-style keybindings in bash

Bash offers many useful emacs-style keybindings for simple commandline editing. For example, Ctrl+w deletes ("kills") word left from the cursor. Another keybinding, Alt+d is supposed to be a "mirror" ...
3
votes
1answer
671 views

How to quickly send commands to nested tmux sessions?

I have the following in my .tmux.conf set -g prefix M-j bind-key j send-prefix I need to press (Atl+J) + (J) + bound-key to send something to the nested tmux session. I feel it is rather slow. Is ...
3
votes
1answer
371 views

How to enable Fn keys on Samsung 900X in Arch Linux?

The only one which works is Fn+F5 (toggle touchpad), presumably because xf86-input-synaptics is installed. Fn+F1 prints a literal plus/minus sign ("±"). Installing samsung-tools and rebooting did not ...
3
votes
3answers
192 views

Replacement shortcuts for `screen` [closed]

Screen uses the shortcut CtrlA to activate. I find that this interferes with the Bash command for jumping to the start of the line, and the VIM command for incrementing an integer. Certainly I could ...
2
votes
3answers
119 views

Remapping a keyboard key to print ⸮ (irony mark)

I find myself using the irony mark ⸮ unicode U+2E2E (or ؟ unicode U+061F) in both mcabber and vim a lot. The old copy-and-paste antipattern is tedious so I thought I would rename one of the many ...
2
votes
1answer
173 views

Suspending the global KDE&X-Windows keyboard shortcuts while specific application is running

I'm running KDE on Arch-Linux 64b. I've been a Vim user for two years now, and I want to try learning Emacs - just so I can have a justification when I diss Emacs users. So far, my main problem with ...
2
votes
1answer
2k views

How do I edit the terminal launch command in Linux Mint?

In Linux Mint (Debian-based) how can I edit what the shortcut Ctrl+Alt+t launches? For example, I would like to issue gnome-terminal with the --maximize option, and to have it launch tmux instantly.
1
vote
0answers
22 views

Linux Mint Search launcher doesn't do anything

In Mint 17, using Cinnamon, if I go to System Settings > Keyboard > Keyboard shortcuts > Launchers there is an option to set a shortcut for something called Search. However, whatever key ...
1
vote
2answers
327 views

Shortcuts in Xfce are not working anymore

After few weeks of using Xfce I suddenly ran into following problem - my keyboard shortcuts are not working when I am using two monitors (actually one monitor and notebook itself). When I unplug ...
0
votes
0answers
82 views

Shortcuts for sakura

How can I configure shortcuts for a sakura terminal? I know about the question Configuring shortcuts for Sakura but since I am quite a newbie I did not success. In the end I would like to have ...