keyboard-shortcuts

How do I select a single line within Visual Studio Code?

こ雲淡風輕ζ 提交于 2019-12-09 05:04:18
问题 Using Microsoft's Visual Studio Code, how do I select a single line of code? (equivalent to Atom's or other IDE's Cmd + L on Mac) And what would be the command I'm looking for? (e.g. editor.action.copyLinesDownAction ) It's quite confusing, since other selection shortucts like Cmd + A and Cmd + D are the same as in my previous IDE's. 回答1: It's Cmd + I by default in VS Code versions prior to 1.32. Starting from version 1.32 it's Cmd + L . You could change it in Keyboard Shortcuts by searching

Use CTRL + D to exit and CTRL + L to cls in Powershell console

做~自己de王妃 提交于 2019-12-09 04:30:34
问题 I am trying to make CTRL + D - exit Powershell console and CTRL + L - clear the screen like in bash. So far, I have seen that we can define function ^D {exit} but that means I have to do CTRL+D and then hit enter for it to work. Also, it doesn't even let me define function ^L {exit} Is there anyway to add these key bindings in the default Powershell console? 回答1: There is a new library PSReadline for Powershell v3.0 that emulates the GNU Bash tab completion and key bindings. Even CTRL + R for

Eclipse Terminate Keyboard Shortcut

♀尐吖头ヾ 提交于 2019-12-09 02:49:46
问题 How do I get eclipse to terminate? I use the keyboard shortcut Ctrl + F11 to run a program and I cannot enable the terminate hotkey, since in development I run the program 100s of times per day I waste a lot of time clicking the red terminate square. I have looked at previous postings of this question and have gone to Windows --> Preferences --> General --> Keys and found "Terminate" command: I have set it to binding Shift + Ctrl + F11 and set the "When" setting to "In Windows" . I have tried

Correct way to create a menu with shortcuts in WPF

孤街醉人 提交于 2019-12-09 01:07:12
问题 What is the correct/best way to create a menu with hotkey shortcuts? I simply want a File menu like Visual Studio's that has New, Open, Save, Save All, Exit, and a few other standard shortcuts. It seems that InputGestureText displays the appropriate text, but since it's called "Text" and doesn't seem to trigger events, I'm going to assume that isn't the right way to do it. The Command architecture also seems fairly bulky, so I don't want to head down that path if there is a better way. Update

can not disable Ctrl+O by JavaScript in IE 11

帅比萌擦擦* 提交于 2019-12-08 19:14:22
问题 I'm trying to disable Ctrl+o key combination in IE, the following code works fine in all IE versions except IE 11 unless I do an alert as you see in code below: document.onkeydown = function(event) { var x = event.keyCode; console.log(event.keyCode); console.log(event.ctrlKey); if ((x == 79) && (event.ctrlKey)) { if(navigator.userAgent.match(/rv:11.0/i)){ alert('Disabled'); } event.cancelBubble = true; event.returnValue = false; event.keyCode = 0; event.stopPropagation(); event.preventDefault

How do you refer to the mac command key in the String version of Java's KeyStroke.getKeystroke?

左心房为你撑大大i 提交于 2019-12-08 18:10:35
The documentation for KeyStroke.getKeystroke(String) (e.g., getKeyStroke("control DELETE") ) does not provide an example of how to access the macintosh command key, and I can't find a reference that lists the spellings of the various words for modifiers like "control" that this function accepts. What is the syntax for the command key? For reference, here's the documentation for getKeystroke: Parses a string and returns a KeyStroke . The string must have the following syntax: <modifiers>* (<typedID> | <pressedReleasedID>) modifiers := shift | control | ctrl | meta | alt | altGraph typedID :=

Matlab editor not using emacs shortcuts

被刻印的时光 ゝ 提交于 2019-12-08 17:22:43
问题 Is there some way I can make the matlab integrated editor not use emacs shortcut, but use more normal shortcuts such that I can press Ctrl + C and Ctrl + V and not be completely confused by the editor doing weird stuff? I'm using matlab on linux btw. 回答1: File -> Preference -> Keyboard -> Choose windows 回答2: Since Matlab 2012, with ribbon UI: Home Tab -> Environment Section -> Preferences -> Keyboard -> Shortcuts -> Active settings: -> Windows Default Set 回答3: File -> Preference -> Keyboard -

WPF KeyGestures - Binding non alphanumeric keys

佐手、 提交于 2019-12-08 16:49:25
问题 Should be a simple one, but I can't work out how to do it. Using WPF4 I want to Bind Ctrl + - to Zoom Out and Ctrl + = to Zoom In: <KeyBinding Command="{Binding Content.ZoomInCommand}" Gesture="Ctrl+="/> <KeyBinding Command="{Binding Content.ZoomOutCommand}" Gesture="Ctrl+-"/> However, I'm getting errors: in the case of Ctrl + = : Requested value '=' was not found. Any ideas? 回答1: Okay - it turns out that the = key does not exist (you can check this through the Key -enumeration - there is no

Is there an 'Open Folder…' keyboard shortcut in VS Code?

江枫思渺然 提交于 2019-12-08 16:41:34
问题 I don't see a keyboard shortcut for "Open Folder..." listed on the documentation page below, and after searching elsewhere for a while I didn't see anything else. https://code.visualstudio.com/docs/customization/keybindings I thought I would ask here before putting an issue on GitHub about it. (Also there doesn't seem to be a open / closed issue about this anywhere on the GitHub repo.) https://github.com/Microsoft/vscode/issues 回答1: There is indeed a shortcut for it, the command is workbench

Silverlight handling multiple key press combinations

倖福魔咒の 提交于 2019-12-08 15:31:56
问题 I have a Silverlight application in which I catch certain key presses such as Tab or Ctrl to perform some action. However, I want to be able to handle multiple keys pressed at the same time such as Ctrl + R or something like that. Is there any way to do that in Silverlight, and if so, how? 回答1: Take a look at the ModifierKeys Enumeration to check for multiple key press combinations. See Silverlight Keyboard Support for code samples and more information. void Canvas_KeyUp(object sender,