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
65
votes
3 answers

Visual Studio Code keybindings - Running two or more commands with one shortcut

I have the following keybinding in VS Code which toggles the position of the cursor between the active document and built-in terminal: // Toggle between terminal and editor focus { "key": "oem_8", "command":…
Nick
  • 3,454
  • 6
  • 33
  • 56
63
votes
4 answers

How do I bind the enter key to a function in tkinter?

I am a Python beginning self-learner, running on MacOS. I'm making a program with a text parser GUI in tkinter, where you type a command in a Entry widget, and hit a Button widget, which triggers my parse() funct, ect, printing the results to a Text…
Ghosty
  • 763
  • 1
  • 5
  • 10
62
votes
4 answers

Set custom keybinding for specific Emacs mode

Though I know how to set a global key-binding in Emacs, I find it hard to even Google out the code for a local (minor-mode specific) key-binding. For instance, I have this code in my .emacs: ;; PDFLaTeX from AucTeX (global-set-key (kbd "C-c M-p") …
aL3xa
  • 35,415
  • 18
  • 79
  • 112
59
votes
9 answers

Is there a way to make alt-f and alt-b jump word forward and backward instead of printing ƒ and ∫ on Mac?

I understand that Mac has some Emacs keybindings enabled by default (e.g. Ctrl+A move to beginning of line etc.). If I open TextEdit for example I can navigate like in Emacs. But when I try Alt+F or Alt+b for move to next word or last word it does…
ayckoster
  • 6,707
  • 6
  • 32
  • 45
58
votes
2 answers

Xcode "move line" keyboard shortcut

In Xcode 4, I have been sucessfully able to add new custom keyboard shortcuts to move lines around or to duplicate a line: /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist My Custom…
dbernard
  • 1,073
  • 1
  • 11
  • 21
57
votes
7 answers

Emacs Keybindings in Visual Studio 2012 or 2013

I would prefer to have Emacs keybindings in MSVS. In MSVS 2008, this was natively supported, and in MSVS2010 there was an extension to achieve…
Woodrow Douglass
  • 2,605
  • 3
  • 25
  • 41
56
votes
1 answer

What is the difference between CTRL-T and CTRL-O in Vim?

The documentation isn't especially clear—CTRL+T is to jump back in the tag stack, whereas CTRL+O is to jump back to the previous cursor position. What's the difference between CTRL+T and CTRL+O? They both appear to exhibit the same behavior.
Matty
  • 33,203
  • 13
  • 65
  • 93
53
votes
5 answers

Sublime Text 2 - key binding to change syntax

I want to make a new key binding to change syntax to, let's say, HTML or CSS. I searched the official and unofficial documentation to see if there are any answers to my problem.
Alex
  • 533
  • 1
  • 4
  • 4
49
votes
2 answers

Unable to understand a line in .vimrc

I do not understand what the following line does in .vimrc nmap v :EditConfig It seems that nmap mean noremap silent seems to mean apparently no beep in Vim leader seems to mean the first character in the mode : v seems to…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
43
votes
2 answers

List all Keybindings for a certain emacs mode

I know that I can list all the keybindings available in emacs by using C-h b, but is it possible to list only the keybindings that apply to a certain mode, say dired-mode. In dired+, I can do ? h and it shows me all the applicable dired mode…
Nathaniel Saxe
  • 1,527
  • 2
  • 15
  • 25
42
votes
2 answers

Import IntelliJ key bindings to Xcode

Is there a keymap for Xcode that would make it behave the same as products from JetBrains? (IntelliJ keymap) I tried Googling, but Google is completely useless in this case, as it presents results for the other way around (importing Xcode key map to…
Jan Kalfus
  • 5,422
  • 2
  • 30
  • 38
41
votes
6 answers

Emacs global-set-key to C-TAB

I'm trying to set a key-binding to Ctrl+TAB in Emacs. I used the following call: (global-set-key (read-kbd-macro "C-TAB") 'my-func) However, whenever I use it, I get a is undefined error message. Trying to set the binding to "C-tab"…
Martin Cote
  • 28,864
  • 15
  • 75
  • 99
40
votes
4 answers

KeyListener, keyPressed versus keyTyped

I have a JFrame (well, a class which extends JFrame) and I want to do an action when I press the F5 key. So, I made the class implement KeyListener. And with that, came three methods, keyPressed, keyReleased, and keyTyped. Which of these methods…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
39
votes
3 answers

How can I change the keybinding used to autocomplete in vim?

I'm not a big fan of Ctrl-n, I'd like to be able to use Ctrl-Space. Any ideas how I can do that?
Geo
  • 93,257
  • 117
  • 344
  • 520
37
votes
1 answer

How do you bind Enter and Esc keys to OK and Cancel buttons respectively in a WPF dialog?

My WPF app uses a dialog with Ok and Cancel buttons. I would like to bind the Enter key to the Ok button and the Esc key to the Cancel button. Seems like it should be a simple thing to do.
Ferruccio
  • 98,941
  • 38
  • 226
  • 299