key-bindings

How to disable Ctrl-Click in VS Code

丶灬走出姿态 提交于 2019-12-03 23:24:05
Wanna know if it's possible to remove the key bind on Ctrl-Click for the goToDefinition ( F12 ) editor action... This is so annoying, every time i try to Ctrl + C / V it trigger and go to the definition cause i'm holding Ctrl while I'm highlighting the code with my mouse... May be it's just a bad habits I got but god I need to turn this off please. I have search for it on google but all y can change is the F12 key bind for goToDefinition which is not what I want. Thanks WoofWoofDude --- Update This is the feature i wanna disable So i need to remove the ctrl+click key bind... Even if i replace

How to set a key binding to make Emacs as transparent/opaque as I want?

隐身守侯 提交于 2019-12-03 14:55:20
问题 I want to have a command in Emacs to make it as opaque/transparent as I want (refer to the fabulous question that pointed out that transparency is possible in Emacs, and the EmacsWiki page linked there which has the code I am using below). The EmacsWiki code sets "C-c t" to toggle the previously set transparency on and off: ;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>])) (set-frame-parameter (selected-frame) 'alpha '(85 50)) (add-to-list 'default-frame-alist '(alpha

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

不想你离开。 提交于 2019-12-03 10:23:27
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. Try setting the IsDefault property on the ok button to true, and the IsCancel property on the cancel button to true. 来源: https://stackoverflow.com/questions/2031322/how-do-you-bind-enter-and-esc-keys-to-ok-and-cancel-buttons-respectively-in-a-wp

KeyPress: How to detect if the user pressed the “Down” arrow key on their keyboard when the app is running

孤街醉人 提交于 2019-12-03 08:47:49
Here is what I've got so far.. I'm using this as a keybind. I want to press the "Down" arrow key anytime the app is running, and then make it auto press the "Down" arrow key 3 extra times then finish by pressing "Enter" in the code. I know this isn't the best explanation but sorry and I will try to explain it any better if you still didnt understand. Here is the code: public class MyKeyListener extends KeyAdapter{ @Override public void keyPressed(KeyEvent evt){ } KeyListener keyListener = new KeyListener() { @Override public void keyPressed(KeyEvent keyEvent) { int keyCode = keyEvent

Emacs global-set-key to C-TAB

自古美人都是妖i 提交于 2019-12-03 05:32:11
问题 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 <C-tab> is undefined error message. Trying to set the binding to "C-tab" results in an error message. How can I set my binding to C-TAB? 回答1: (global-set-key [C-tab] 'my-func) 回答2: Unlike others have suggested, it is a good idea to use kbd (or read-kbd-macro which is basically the same thing) in case you ever want to use the

Bind shortcut to command palette command?

扶醉桌前 提交于 2019-12-03 04:25:33
问题 I just installed a plugin called CodeSniffer (http://soulbroken.co.uk/code/sublimephpcs), and I want to link one of it's commands from the command palette to a keyboard shortcut because I use it so often. Is there any easy way to do this? Or will I just need to ask the developer what the name of the command is (in the command palette it is 'PHP CodeSniffer: Clear sniffer marks')? Thanks 回答1: It's actually very easy to find the name of a command but it requires a few steps. Open Sublime Text's

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

雨燕双飞 提交于 2019-12-03 04:12:27
问题 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 not work. It prints out ƒ and ∫ instead. Is there a way to jump words instead? I think that I did not tinker with the keybindings and I use the US layout on a german keyboard. 回答1: Maybe one of these helps? (I don't use OSX myself, so I can't

xdotool commands bound to key shortcuts doesnot work

不想你离开。 提交于 2019-12-03 03:40:14
I like VIM a lot and I wanted to use it's keybindings everywhere. There are many IDE plugins that can emulate this but I wanted more, maybe VIM keybindings in Minecraft? :D or VIM keybindings everywhere without the need to download any plugin. I noticed that every single editor implements this keys: Home , End , Ctrl + End , Ctrl + Left , Ctrl + Backspace and so on... I used these keys as a building blocks and I came up with this config for i3wm: mode "VIM MODE NORMAL" { bindsym --release h exec "xdotool key --clearmodifiers Left" bindsym --release j exec "xdotool key --clearmodifiers Down"

Set custom keybinding for specific Emacs mode

▼魔方 西西 提交于 2019-12-03 01:09:39
问题 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") (lambda () (interactive) (shell-command (concat "pdflatex " buffer-file-name)))) I don't want to set it globally. Is there a function like local-set-key ? 回答1: To bind a key in a mode, you need to wait for the mode to be loaded before defining the

Multiple-line cursor movements in XCode 4

大憨熊 提交于 2019-12-03 00:42:28
The same question has been asked for Xcode 3 But the solution there is said to not work with Xcode4. And no new solution is available there. How to get a key-binding to move the curser up/down about 10 lines in Xcode 4 ? Blaz Eureka! Inspired by the answer on line duplication , this is how you empower Xcode 4 with multiple-line movement: Go to the folder /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources Open IDETextKeyBindingSet.plist . Add a new dictionary Customized and two new command (say, Move Down 10 and Move Up 10 ) keys as the screenshot below: Restart