Is there any way to use Fn or super (windows) to define new keyboard shortcut in PhpStorm?
(Almost all key combinations are allocated right now)
Most likely you can't do it directly since Java will not recognize such key codes, however there is a workaround using third-party tools like AutoHotkey.
The idea is to map a keyboard shortcut that is not recognized by Java to the one that is recognized but is not already used because it's hard to type manually.
For example, to map Win+N to Ctrl+Alt+Shift+Z use the following script in AutoHotkey:
#n::^!+z
Now you can map any action to Win+N in PhpStorm Settings | Keymap.
Abilty to use Fn key would depend on the particular keyboard. If this key sends separate key code that can be recognized by Autohotkey, then you can map it the way described above. My Logitech keyboard has Fn key that doesn't send a key code and therefore cannot be used. However, I was able to map ALT GR key (right alt) using AppsKey in AutoHotkey.
Related
I am currently using IDEAVim on intelliJ on a 60% keyboard without arrow keys.
I am looking for a way to expand the menu of "Show Intentions Action"(the menu which you get from hitting + ) to the right without having to use the arrow key.
If i just hit enter, it will select and execute the intention instead of giving me a menu to "Suppress" or "Ignore" the intention
You cannot remap any cursor keys for the menu actions in IntelliJ IDEA.
The only workaround I can see if to use some system application to remap the keys depending on the OS you are using. For example, on Windows one can map some keys combination to produce the arrow key code with AutoHotkey or a macro in the third-party keyboard driver settings.
Anything that will produce the same code as the real right arrow key on your system should work.
Is it possible to use J and K when choosing a suggested auto-completion item? See the image below: I'd like to, maybe hold ALT or SHIFT (or in some other way differentiate between moving and typing), and use J and K to select the proper suggestion.
Is anything similar also available for moving around the menus (in Project view etc.)?
I was able to make this work by creating a shortcut ALT+J mapped to the Down key and ALT+K to the Up key.
You can move up and down in the popup without needing to move your hand away from HJKL to the arrow keys.
This also works in the Find in path window, though it does not work in the navigation menu.
Update: For Alt + K to work in the Find window since the version 2020+, one has to disable mnemonics in Settings, under Appearance & Behaviour -> Appearance -> Disable mnemonics in controls.
#Rok Povsic's solution is great and I used it a bit, but in some pop up menus like Intention actions, refactoring menu or usages the trick won't work.
So I used this Power Toys program from Microsoft to remap the Alt+J, Alt+K, Alt+H, Alt+L to arrow keys at windows level and now this works great everywhere around the IDE.
You can even specify only the app in which you want to override this shortcuts. For example for rider it will be "rider64.exe". You can find the name of the app you want to use in task manager under "Details".
I'm using Intellij IDEA 2017.1.4 (Community Edition). How do I dismiss the file structure view (Navigate > File Structure)? I've been hitting the esc with no results; it stays there until I either choose an item in the list or click elsewhere with my mouse pointer (which is very inconvenient to me).
My problem was due to the esc being used as primary keyboard shortcut for a few other keyboard shortcuts. I'm using Emacs keybindings and I think they were set there by default. The escape function was mapped to esc+esc, which I already knew. To resolve this issue, I looked for all shortcuts whose primary key was esc, and remove that particular binding (or replaced them with something I'm more comfortable with). I also updated the mapping of escape to only use single key press.
I actually also set another binding to the escape functionality, ctrl+G, which also doesn't work to dismiss the file structure view. I think within the context of file structure view, the IDE follows a slightly different set of keybindings so no matter what I map to the escape functionality, it will only honor the single key press of esc.
Is there a way to move through list of suggestions without leaving keyboard home row? I am looking for some kind of vim-style analog to up/down arrow actions.
For people reading this on 2019
you can use Ctrl + n and Ctrl+ p to cycle the autocomplete options
Reference: https://youtrack.jetbrains.com/issue/VIM-438#comment=27-520874
You can bind Fn + hjkl to arrow keys globally in your OS. No more leaving the home row, ever! Fn is often located in the bottom left corner of the keyboard where you can easily reach it with your left palm.
On OS X you can remap the keys using excellent Karabiner software (formerly known as KeyRemap4MacBook) which has a "Vi mode" preset.
On Linux there are several solutions using xmodmap or XKB, see https://superuser.com/questions/96299/mapping-superhjkl-to-arrow-keys-under-x. You might need to substitute Fn for LCtrl: I'm not sure if Fn is visible to key remapping code at all.
Not sure if there are any options on Windows.
Also, certain high-end keyboards can remap keys in hardware as well.
On Windows, you can use AutoHotkey to remap Win+jk to DownUp
#j::Send {Down}
#k::Send {Up}
On OS X one can use ⌃+N and ⌃+P. No external tools required!
I'm trying to bind the cmd key in Pharo 3.0 to another key because my system (linux+xmonad) already uses the alt key for other things.
I am trying to bind cmd key, currently mapped to alt, to the win/super/meta key.
I changed method defaultModifier in UnixPlatform class, from:
defaultModifier
^KMModifier control
to:
defaultModifier
^KMModifier meta
But nothing changed. Should I do something else?
There is no easy way to change it in the image short of manually rewriting the shortcuts, because there are many tools that define the shortcut explicitly for each platform by themselves plus there no consensus on what the default shortcut for linux should be (right now it is ctrl and alt).
However this is something that might be tackled in the next version (=5) (4 was released today).
I had to change my dwm (xmonad predecessor) keybinding to the "win" key because of it. (On the plus side it has freed alt, so I can now use alt for example to switch tabs in Chrome and many other.)
There are two places where you might want to make changes:
either at the vm level, where you could change the keyboard event handling (not recommended)
in the keymapping packages you'll find the code to deal with the different key combinations. The different packages then add shortcuts using this mechanism.