Linux keyboard shortcut - linux

Why on my Linux VS Code installation "Close window" shortcut is different: I want to use ctrl+w as I do on mac and as I do on any browser, but now I must do ctrl-f4

Customize a keyboard shortcut
On the menu bar, choose Tools > Options.
Expand Environment, and then choose Keyboard.
In the list, choose the command to which you want to assign a keyboard shortcut.
In the Use new shortcut in list, choose the feature area in which you want to use the shortcut.

Related

Can I use a keyboard shortcut to save work in Matlab on Linux?

All Windows editing programs allow you to save your work by pressing Ctrl-S. Linux has an independently developed and mostly different set of keyboard shortcuts from what's standard in Windows. I am learning some of the Linux shortcuts as I program Matlab (by GUI, opened from BASH), but I can't find any shortcut to save the code I'm on, the equivalent of Ctrl-S.
Is there anything, or in this operating system that hosts Emacs, which focuses its keyboard shortcuts on not having to move the hands at all, is the only way to save code by moving my hand to the mouse?
From http://www.mathworks.com/help/matlab/matlab_env/keyboard-shortcuts.html#br7ulae-1, you can go to:
Preferences > MATLAB > Keyboard > Shortcuts > Active settings
and change your keyboard shortcuts to the Windows Default Set.

How to configure IntelliJ (also Android Studio) redo shortcut to CTRL+Y instead of CTRL+SHIFT+Z?

The default IntelliJ / Android Studio "Redo" action shortcut is CTRL+Shift+Z and this is a common problem for Windows users.
A bigger problem is CTRL+Y is mapped to the "Delete line" action - and this causes the undo stack to be lost.
To solve this issue, how can the "Redo" shortcut be changed to CTRL+Y in IntelliJ?
Open Settings (press CTRL+ALT+S)
Click Keymap on the left list.
There is a combobox that contains keymaps. Select one of them (default means IntelliJ of course. We can't change any of pre-defined keymap however we can copy, edit and then use the edited one. So) we should copy "default" to change only redo mapping.
Give a new name to your copied keymap.
Right click on:
Main Menu -> Edit -> Redo to click "Add Keyboard Shortcut"
Press CTRL+Y
Click OK
Click "Remove" to "the shortcut is already assigned to other actions. Do you want to remove other assignments?"
If you want to use any "remove line" shortcut also, then go to delete line shortcut and give to it any other shortcut (like 5th step)
Click OK to close settings window.
Change the keymap setting to the Visual Studio, Eclipse, or NetBeans preset.
The settings window can be found under File > Settings. CTRL+ALT+S should work if the shortcut hasn't been changed. In the settings window you should find Keymap under the Appearance & Behavior settings list.
You can configure each editor command to a key combo that you like (as #ismail yavuz mentioned) such as for Redo to CTRL+Y or you can just change the Keymap setting to an editor that you are used to. This might be best if you are in the process of switching to IntelliJ as it is probably the path of least resistance. The default settings for the Visual Studio, Eclipse, and NetBeans keymaps all map Redo to CTRL+Y.
The Principle of least astonishment is strangely violated for Windows users but at least shortcuts is customizable. Because of this command being so contrary to the Windows experience I decided it wasn't worth learning the IntelliJ keyboard when anywhere you're working at you need to, you can quickly change. There are almost no drawbacks to not learning the IntelliJ. Remember that in the keymap menu you can search for a command in the search box or click on the magnifying glass on the right to search by key combo.
Of course neither answer is wrong. Chose your preference.

How to unbind a key binding

Windows 8, Visual Studio 2012, fresh install, "Visual C++ developer" keyboard scheme.
Each time I press Ctrl+Shift+1 or Ctrl+Shift+2 (which is set up so switch between input languages), visual studio opens some new windows.
How do I unbind the keys?
I don't even know which command they are bound to. Google founds "Navigates to the next definition, declaration, or reference of an item". OK, I've tried typing both "definition", "declaration", and "reference" into "show commands containing:" box but I was unable to find any command bound to Ctrl+Shift+1/2 combination.
Thanks in advance.
Click Tools, Options, Environment, Keyboard.
Enter the keys in the Press shortcut keys box to find out what they're bound to
Enter part of that name in the upper filter box, then select the command
Click Remove

Visual studio 2012 - is there a keyboard shortcut to move files from quick view to the open files

I usually click with the mouse on the "Keep open" icon.
Is there a way to do it with the keyboard?
Thanks.
Default Visual Studio 2012 keyboard shortcut for when your cursor is in the preview window:
Ctrl+Alt+Home
It can definitely be modified as JMik describes but that will get someone going quickly. As well, you can also kill the preview system entirely so that all windows open indefinitely and this shortcut becomes unneeded.
Press Ctrl+Q, and type "keyboard" and press Enter to open the "Options->Environment->Keyboard" window.
In "Show commands containing" type "Window.KeepTabOpen", then in the "Press shortcut keys" type your keyboard shortcut and press the "Assign" .

Can I assign custom keyboard shortcuts for menu items in applications on Ubuntu?

OSX allows user to add custom keyboard shortcuts for menu items. For instance you can define a custom keyboard shortcut for "Copy" and it will work for every application that has a menu item called Copy.
Is there a way to do this for GTK and/or KDE applications?
For KDE applications, it is possible for common keyboard shortcuts. To do this, open systemsettings and navigate to Standard Keyboard Shortcuts.
For example, here I change the shortcut for "activate next tab" to Ctrl-Tab (for consistency with Firefox):
This changes the shortcut in most tabbed KDE applications as well as tabbed dialog boxes. You can specify up to 2 alternative shortcuts for each action.
However, this only works for common shortcuts; you can't globally specify shortcuts for arbitrary menu-item captions.
I don't think GNOME applications have any such feature. You have to change the shortcuts individually (for each application). (Generally KDE is more customizable.)
Is there a way to set an absolute keyboard shortcut for an arbitrary menu item name that will be honored by any GTK+ application?
No.
Can you set a different global shortcut for Cut/Copy/Paste?
I suspect so. I didn't do the reading, but here's two promising links: making keyboard shortcuts in linux as uniform as the mac and change default/preference keyboard shortcuts like copy & paste
You can of course modify GTK+ applications to tweak their shortcuts. In the case of a GTK+ application whose GUI was designed with Glade, e.g. virt-manager, this could be ridiculously trivial.
I suggest you to take a look at xbindkeys and xdotool. Those are the automation tools which can help you to simulate certain keystrokes with customized shortcut.
By this means, though you don't really modify the original shortcuts, but you can still make your desired key combinations functional.

Resources