android studio navigate back shortcut not working in windows - android-studio

Has anyone (who is using windows) had this problem that navigate back shortcut in Android Studio is not working? The shortcut key Alt+Ctrl+Left/Right Arrow is not working, which, I guess, is because of conflicting with some graphic card's shortcut. Is there a way to get rid of that?
I tried to disable the key combination in the graphic card setting, but still not working. It's intel graphic card, btw.
Another fact is that after I remove the combination in Android studio keymap, the adding shortcut setting does not recognized the key combination.

Navigation:
Control Panel[Select large icon]> Find Intel graphics option > Open
setting screen
Just try to customize new hotkeys in Intel Graphics panel,
does not metter - disable or enable this hot keys

Just disable the hot keys from the graphics option -> Hot Keys -> Disable in the tray.
Worked for me.
Edit: Added screenshot

Actually I had to reasign this hot keys for something other, then disable

For intel graphics, right-click in desktop and choose Graphics Properties (or go Control panel and Intel graphic app) then choose to Option and support tab then hotkey manager and uncheck Hot key in top, or change keys in below.

Very similar for me:
Intel Graphics Command Center -> System -> HotKeys -> Enable System HotKeys: Off
Please note, that if it is already turned off, turn it on and off again. I'm not kidding. I had to do the same thing.

If you are using windows 10, just disable the hotkeys of Graphics
Go to Desktop.
Right-click anywhere on the desktop screen.
Select "Graphics Options" -> "Hot Keys" -> "Disable"

Solution For Ubuntu
Not all navigation keyboard shortcuts are listed in Settings GUI therefore you won't be able to unbind CTRL+ALT+←/→ from there.
Verify that CTRL+ALT+←/→ are effectively bound to "Switch to workspace left/right":
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-left
gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-right
Unbind the shortcuts:
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "[]"

The easiest solution for any issue related to keys is to Restore Default Copy.
To restore go to File -> Settings -> Keymap -> Select Windows/Default copy (If you are using default Keymap or select your current keymap) from drop-down then click on the small settings button and select Restore Default Copy in the option.

Related

Alt button not detected on some keymap shortcut IntelliJ (elementaryOS 5.1.7

Settings
IntelliJ 2019.2 (same issue in 2020.2)
elementary OS 5.1.7.
AZERTY bluetooth Keyboard (Logitech K260)
French Keyboard Layout
French Input method
No custom configuration made either in IntelliJ or in the OS
Problem
The "Move Line Up/Down" shortcut I was using on Windows (Shift + Alt + Up/Down) is not working.
Description
On intelliJ, I opened Settings/Keymap window to check the shortcut was correctly set.
When trying to redefine this shortcut, the "Alt" button was not detected when pressed.
However, I can use it on elementaryOS (e.g. Alt+Tab is working).
On intellij, I can use some other shortcuts like "Alt + Up".
My OS were recently installed.
I already tried to put UK layout/input method with no success.
Two ideas:
system settings : something i missed in keyboard settings ? Don't know much about linux configurations.
IntelliJ option i'm missing.
Thanks.
Finally found the issue.
On elementaryOS,
Go to your Keyboard settings, select "Layout" tab.
On "Switch layout" options, change the default shortcut "Alt + Shift".
Then I am able to reuse this specific shortcut in IntelliJ.
See the screenshot below to get more information:
Keyboard/Layout/Switch layout

Can VSCodeVim Ignore Windows Key Combination?

I have Windows+I set as a keyboard shortcut to open up chrome, but if I try to use that while keyboard focus is on VSCode with vscodevim enabled, it treats it as if I had just typed I by itself (and enters insert mode).
I'm running mate desktop manager on Arch Linux. The Win-I shortcut is set through system -> preferences -> hardware -> keyboard shortcuts.
I've tried adding the following to settings.json:
"vim.handleKeys": {
"<T-i>": false
}
I've also tried <Win-i>, <T-I>, <Win-I>, <Mod4-I>.
Is there a different syntax to specifiy windows key being pressed? Or a different way to have ideavim register that it's pressed and ignore the input? The key is displayed as Mod4 in the mate keyboard shortcuts menu.
I know I can map the chrome shortcut to something else like Alt+F3, but I'm hoping to keep it as Win+I if possible. Any help appreciated!
Try adding the following setting:
"keyboard.dispatch": "keyCode"
Restart vscode after that.

Can't activate shortcut on intellij products

Description
I'm using some intellij products (WebStorm, PHPStorm) and Android Studio and have the same issue with both of theses.
I have an azerty keyboard, with a french layout.
I can type without issue in these softs, but I can't activate shortcuts.
When I try to activate a shortcut (e.g ctrl+z), the activated shortcut is ctrl+w.
the shortcut is correctly triggered, but with the wrong keyboard layout. It seems that when I type, my french keyboard is used, but when I want to use a shortcut, the english layout seems to be used.
Is this a known bug (if so, I've not found any mentions about it), or did I miss something?
What I've tried
I'm running on Fedora 29, with Gnome 3.
I've tried to see if it wasn't reproductible with others softs (e.g firefox/ vscode), and I can't reproduce this.
I've tried to see if it wasn't based on my keyboard settings, so I ran xev to monitor the output of pressed keys. I can't reproduce this issue.
In intellij settings, I've tried to set Keymap > Prefer key position over key char with national layout both true and false, it doesn't seem to change anything.
Current situation
Here is an exemple of a shortcut definition in Android Studio.
I pressed A to Y keys on my french keyboard (which output A,Z,E,R,T,Y), and then press the same keys with ctrl (which output ctrl+Q instead of ctrl+A and so on)
https://imgur.com/a/U4aFd7F
Expected situation (tl;dr)
I expect that when I press ctrl+a, the shortcut triggered inside intellij products is ctrl+a instead of ctrl+q
It is indeed a known bug: https://youtrack.jetbrains.com/issue/IDEA-165950
In the bug report another workaround is mentioned for Gnome 3:
Re-order the languages in Settings > Language and Region tab, put English(US) first of the input source list.
I solved it by running setxkbmap fr. I don't know why this is required by intellij products, but it works.

Centre code in Android Studio/IntelliJ IDEA editor

I would like to centre my code in the Android Studio's/IntelliJ's editor, like as it is done in the Distraction Free Mode.
Right now, it is always aligned on the left side of the editor, but I want to have it in the centre of the window. I could not find any option for this in the settings. Is this possible without entering the Distraction Free Mode?
Add -Deditor.distraction.free.mode=true in Help | Edit Custom VM Options and restart the IDE. This will center the editor without the other features of the distraction free mode (like hidden tool windows).
You can also activate this option through the registry:
Type shift shift to search everywhere
Type registry and select "Registry..."
Type distraction to filter the list
Check the box for "editor.distraction.free.mode"
Close the registry
Voilà, no restart needed.

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.

Resources