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
10
votes
1 answer

How to set a Single key Mnemonic in button in Java?

I am working on a project and I want to set Mnemonic on buttons. But the problem is Mnemonic works on pairing key example (Alt+F) etc. But I want it to be on single key.
hemant
  • 564
  • 2
  • 13
  • 37
9
votes
1 answer

In IntelliJ IDEA, how can I create a key binding that executes a shell script with the current file as a parameter?

In IntelliJ IDEA, how can I create a key binding that executes a shell script with the current file as a parameter? For exanmple, if I am in a test file (entity.spec.js), I want to save and hit a key binding to trigger a shell script with that file…
user285879
9
votes
2 answers

Globally overriding emacs keybindings

Is there a command to globally override a keybinding such that it overrides even the local settings of major modes? global-set-key is overridden by major mode bindings, as stated here:…
Michael Gummelt
  • 702
  • 4
  • 15
9
votes
2 answers

Append keys to an earlier recording in vim

I know what recording in vim is. Let's say I have already a recording on a register and I'm missing some more keys that I want to add to that sequence. Is there a way to append these keys to an earlier recording in vim?
Felix
  • 1,837
  • 9
  • 26
9
votes
4 answers

How do I bind a key to "the function represented by the following key sequence"?

I'm just starting to learn emacs (woohoo!) and I've been mucking around in my .emacs quite happily. Unfortunately, I don't know Lisp yet, so I'm having issues with the basics. I've already remapped a few keys until I fix my muscle…
Katriel
  • 120,462
  • 19
  • 136
  • 170
9
votes
3 answers

visual studio code - how to comment multiple lines for html (each line instead whole block)

When I comment HTML files, VSCode wraps my selection and puts a single tag around the whole selection. How can I change it so that instead it comments every single line individually? (like e.g. in WebStorm) Thanks!
Han Che
  • 8,239
  • 19
  • 70
  • 116
9
votes
1 answer

How to write a conditional mapping in VIM?

I want to do nnoremap Q :q! and nnnoremap Q :bd, how can i mix these two bindings? What i ideally want is to make the Q binding smart enough to know when we are in a buffer, and when this is the last buffer in the window.
amin
  • 3,672
  • 5
  • 33
  • 61
9
votes
2 answers

Run npm command on keybinding in Visual Studio Code

I want to bundle js files on save using webpack. This is best accomplished using webpack watch. But whatever... In the answers below is the result of my googling, which I hope will be useful to somebody at some point.
Rafael Emshoff
  • 2,541
  • 1
  • 35
  • 47
9
votes
1 answer

How does Java dispatch KeyEvents?

I've read the definite tutorial on key bindings a few times, but my brain cache doesn't seem large enough to hold the complicated processes. I was debugging a key binding problem (turned out I was using the wrong JComponent.WHEN_* condition), and I…
Geoffrey Zheng
  • 6,562
  • 2
  • 38
  • 47
9
votes
1 answer

tmux up-pane/down-pane missing

I'd like to rebind the action of changing the active pane in tmux. In version 1.1, I did it like this: bind-key -n C-] up-pane bind-key -n C-[ down-pane I've upgraded to to version 1.3 recently, and now I get the following error…
oneself
  • 38,641
  • 34
  • 96
  • 120
9
votes
3 answers

Emacs cheat sheet that lists equivalents to everyday vim commands

There were two things that I want to know how to do in Emacs (23.2, *nix): Go to the first character after indentation in a line Go to the first character that's the equivalent to a given character (an equivalent to vim's fx command that goes…
Yktula
  • 14,179
  • 14
  • 48
  • 71
9
votes
5 answers

Sublime Text: How to set up begining of line/end of line shortcuts to match the shell?

I've been using Sublime Text for a little while now (on MacBook Pro), and want to make it keystroke compatible with the shell. In the shell, to jump to the beginning/end of line I press fn+Left/fn+Right. In Sublime Text, I understand how to set up…
U007D
  • 5,772
  • 2
  • 38
  • 44
9
votes
3 answers

Add Watch Expression in Eclipse using keyboard shortcut

I need help adding a keyboard shortcut for adding a watch expression in Eclipse. I can add a watch by right-clicking in the "Expressions View", but having go back and forth between the keyboard and mouse cuts down on efficiency. Can anyone offer…
Miranda
  • 91
  • 1
  • 2
9
votes
2 answers

User super key for meta commands in emacs

I'm trying to learn emacs and would like to use the super key on my keyboard for any meta commands in emacs, because I use dwm as my window manager and it uses the meta key extensively. I have read this page, using it to try (setq x-meta-keysym…
adiviness
  • 169
  • 1
  • 8
9
votes
2 answers

Excel VBA to list key bindings (OnKey ?)

I am working with a large set of Excel vba scripts and some of them are bound to Ctrl-key combinations. I know how to set one at a time in the user interface for Excel: Pull up the list of vba scripts (Alt-F8), select a script, and click Options. …
Mark Goldfain
  • 731
  • 2
  • 8
  • 24