Questions tagged [key-bindings]

Anything related to key-bindings (a.k.a. "keyboard shortcuts", "hotkeys", etc.), i.e. the associations between key combinations and the corresponding actions triggered when the user presses such combinations.

Anything related to key-bindings (a.k.a. keyboard shortcuts, hotkeys, etc.), i.e. the associations between key combinations and the corresponding actions triggered when the user presses such combinations. For example, pressing alt + F4 closes an application on Windows, while ctrl + C copies the selected text into the clipboard for both Linux and Windows GUI applications.

See Wikipedia on keyboard shortcuts.

1731 questions
11
votes
3 answers

Super key binding in emacs

(global-set-key (kbd "") 'duplicate-line) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECB MODE;;;;;;;;;;;;;;;;;;;;; (global-set-key (kbd "") 'ecb-goto-window-methods) (global-set-key (kbd "")…
Kaunteya
  • 3,107
  • 1
  • 35
  • 66
11
votes
2 answers

Key bindings vs. key listeners in Java

I note that in Java / Swing there seem to be at least two different ways of handling key events: Key Bindings Key Listeners What are the advantages / disadvantages of each, and when should you prefer one rather than the other?
mikera
  • 105,238
  • 25
  • 256
  • 415
11
votes
3 answers

Emacs name of current local keymap?

I am writing an elisp function that permanently binds a given key to a given command in the current major mode's keymap. For example, (define-key python-mode-map [C-f1] 'python-describe-symbol) The command and the key sequence are gathered…
ealfonso
  • 6,622
  • 5
  • 39
  • 67
10
votes
3 answers

Mapping dead keys like "^"

I'm currently rebinding almost all of my Emacs bindings to fit my new keyboard layout, bépo, a french equivalent of dvorak. I'm having trouble mapping my ^ key. The ^ key is a dead key but not at a material level. I'd like to be able to to map C-^…
lots_of_birds
  • 103
  • 1
  • 6
10
votes
1 answer

Java KeyListener Not Registering Arrow Keys

I'm writing a simple program in Java which includes a KeyListener with the following overriding they KeyTyped method: @Override public void keyTyped(KeyEvent e) { int key = e.getKeyCode(); …
Landric
  • 271
  • 1
  • 6
  • 22
10
votes
2 answers

Is it possible to implement emacs style keybindings in all Qt programs (probably as a qt plugin)?

Gtk programs can have different keybinding themes by binding different keys to gtk signals, but afaik, qt programs cannot do that now. Since Qt support plugins (as most of this kind of library do, and what I mean here is High Level Plugin or Qt…
yuyichao
  • 768
  • 6
  • 28
10
votes
2 answers

java keylistener not called

I have written a sample code using KeyListener in Java, I have created a JPanel, then set its focusable to true, I have created a KeyListener, requested a focus and then added the KeyListener to my panel. But the methods for the keyListener are…
BBB
  • 305
  • 1
  • 6
  • 19
10
votes
2 answers

Emacs Describe Key in vim

Is there any feature in Vim which shows me what a keyboard shortcut is bound to in the current context? Something like describe-key in emacs. I'm trying to find out which keys i can safely rebind and which are bound to something useful.
Kungi
  • 1,477
  • 1
  • 18
  • 34
10
votes
2 answers

Rebind digits for normal mode in evil

Is it possible to rebind digits. That, for example, "5" is "$", and "%" is "5"? In evil-maps.el digits are defined like this. (define-key evil-motion-state-map "1" 'digit-argument) (define-key evil-motion-state-map "2" 'digit-argument) ... I tried…
user14416
  • 2,922
  • 5
  • 40
  • 67
10
votes
1 answer

Emacs Lisp error "Wrong type argument: commandp"

What is wrong with the following code: (defun test (interactive) (message "hello")) (global-set-key '[f4] 'test) When evaluating this with eval-region and then pressing F4 I get the error: Wrong type argument: commandp, test
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
10
votes
3 answers

How do you make key binding for a JFrame no matter what JComponent is in focus?

How do we make key bindings for a JFrame regardless of what's in focus in the frame? I already looked at this question: How do you make key bindings for a java.awt.Frame? I tried setting the input map for the root pane of the JFrame, but it doesn't…
trusktr
  • 44,284
  • 53
  • 191
  • 263
10
votes
2 answers

Emacs Unbind a Mode's KeyBinding

I've created a custom key binding macro as follows: (global-set-key (kbd "C-C C-c") "\C-a\C- \C-n\M-w\C-y") The problem is that C-c C-c is defined for python-send-buffer in python-mode. So my macro works for all modes except python-mode. I am…
darksky
  • 20,411
  • 61
  • 165
  • 254
10
votes
1 answer

Java Key Bindings Not Working

I am trying to make key bindings in Java on a JPanel. I want a certain action to execute when I press the 'w' button. I follow the Java tutorial on making bindings, but the actionPerformed method does not execute (i.e. no text prints out). The…
user2640461
  • 215
  • 2
  • 6
10
votes
0 answers

Is there any good emacs keybinding extension for chrome

I know there are some excellent extensions on Firefox for operating the browser like vi or emacs. So I found some extensions(vimmum, emacssome, emacs-mode, etc...) declare it have the same functions. But, all of them work so bad in chrome, most…
10
votes
0 answers

Is the a way to enable node.js REPL terminal color with vim-key-binding?

Running node in terminal will bring you into its REPL mode, with syntax highlighting (e.g. number is yellow, while string is green). However, I'm not comfortable with it's default emacs-key-binding, so I follow some suggestion: alias node='env…
neizod
  • 1,582
  • 15
  • 24