Remapping X key to Alt + Right - keyboard

I am trying to X key to Alt + Right but I can't seem to get it right. This is what I have so far:
z::Send {Alt Right}
If I use it in VLC it doesn't have the same effect as if I press Alt+Right manually. I suspect it has to do with not being able to have alt pressed and then press right slow enough for VLC to get it.
Any ideas? Thanks.

Put the alt modifier outside of brackets.
z::Send !{Right}

Related

AutoHotkey Right Alt + Shift doesn't work

I have made an Autohotkey script that presses left when pressed RightAlt + j and the other arrow keys in a similar way, similar to how you can move with HJKL in vim, except that everything is shifted one key to the right and you have to press RightAlt (I'm using the US qwerty keyboard scheme, hence I have no AltGr) because I got annoyed of reaching out to the bottom right of the keyboard for the arrow keys.
So, this works, I can press RightAlt + j to move right and k, l and ; for the other arrow keys. However, I want to support Shift + RightAlt + j, so that I can easily select text with those keybindings. That's why I made this:
>!+j::Send {+Left}
However, when I try to do this, it simply does nothing. It does't send j, it doesn't send left, it just does nothing.
What's wrong with this and how can I fix it?
You just put the shift modifier (+) inside the brackets, when it should be outside. This code should work.
>!+j::Send +{Left}

How to select multiple places (sublime) in code in Android Studio?

How to select multiple places in code in Android Studio ?
I want to insert the same text in multiple places in my source code. Like a have more than one mouse cursor. I used to do it in VS2012 so easily though not sure how to do it in Android Studio ?
I found how and lets share this cool feature with you. I found three cool features:
For multiple selection just hold alt + shift then select whenever you want to change by mouse click then type some thing you can write at multiple places at the same time.
Another cool feature is column selection. This lets you to click in a great manner and greatly of help especially when you are refactoring.
In most systems it works with holding middleMouseButton and dragging over your code and in others it works by holding alt and selecting code it acts like below:
the third cool feature is sublime selection it finds the same word in code and let you change that or append that easily. you can do that by pressing alt + j on Windows / Linux and ctrl + g in mac. Look how it works:
Also as #Narayana said in comments, Ctrl + Shift + Alt + j selects all occurrences in one shot, for one-shot refactoring.
You can use Alt + Shift and click multiple locations to for multiple cursor.
To select similar occurrences in files use Alt + j.
For more details : Click Here
Multiline Caret (without mouse)
Windows: CTRL + CTRL(Hold) + ↑ / ↓
Mac: ⌘ + ⌘(Hold) + ↑ / ↓
ESC will end multiline mode.
Change Multi-caret Hotkey
To add a custom Keymap, CTRL+SHIFT+A, type keymap and click on the one with Settings as subtext. Search for Clone Caret Above and Clone Caret Below.
I mapped mine to ALT+SHIFT+↑ / ↓.
Bonus
Try holding combinations of CTRL, SHIFT, and arrows for improved selection power.
For both Mac and Windows, just open the Context Menu and click on the "Column selection mode" to enable or disable the behaviour..
On a MacOS you can use:
Tap: Control + Command + G - Select all the same value
Tap: Control + G - Every tap combination select the new same value
Hold: Option + Mouse Click - Select multiline with a mouse
Hold: Option + Shift and Tap: Mouse Click - duplicate cursor for a each tap place
Press Shift + Alt + Insert combination to edit in Column selection mode.
On a mac I like to do ⌥ (option) + shift + mouse click on multiple lines in Android Studio 3.1.3.
Use the following:
ALT + SHIFT
on Mac , hold OPTION + SHIFT then use the mouse to highlight what you want to select
On Windows, you can try a plugin whose name is ConyEdit. It has a great column mode based on regular expression.
I'm using android studio arctic fox and pressing Alt alone and then selecting code is working properly in windows.

Remapping Alt+` to ESC

My Esc key is broken on my keyboard, and I would like to remap it to Alt+` (that's Alt and ` grave accent, same button as the ~ tilde). However:
!`::Esc
will trigger Alt+Esc when pressed (!Esc) because the Alt key is held down. How do I remap Alt+` so that, when pressed, it will trigger Esc rather than Alt+Esc?
EDIT: I am not opposed to using an entirely different program to remap my keys. I just want to remap ALT+` to
the Esc key in all of my Windows.
Use SendPlay:
!`::sendplay {Esc}
SendPlay [...] buffers any physical keyboard or mouse activity during the send, which prevents the user's keystrokes from being interspersed with those being sent.
I found two possible ways to achieve this.
Use BlockInput
Disables or enables the user's ability to interact with the computer via keyboard and mouse.
!p::
BlockInput On
send {Esc}
BlockInput, Off
return
You might need to run the script as administrator and the alt and/or p may get stuck down, which led me to the second solution.
Use KeyWait
Waits for a key or mouse/joystick button to be released or pressed down.
!p::
KeyWait, Alt
send {Esc}
return
This should work:
!`::
SendInput, {Alt Up}{Esc}
Return

IntelliJ Column Selection using Cursor Keys

Is it possible to some how setup IntelliJ IDEA so that I can column select with the cursor keys similarly to how I might in Notepad++, Visual Studio, or FlashDevelop.
For instance when I'm typing code I almost always do my navigation solely through use of the keyboard. In the IDEs mentioned previously I can quickly select blocks of code by holding Shift + Alt then tapping ↑ to extend my cursor across the lines above. I can then hold Shift + Alt + Ctrl and tap ← or → to quickly jump across words and select the chunk of text I want.
In IntelliJ IDEA I have to constantly enable and disable Column Selection Mode using the Shift + Alt + Insert and even then it doesn't quite function as it does in the other IDEs or Text Editors.
Any ideas?
You can do column editing using the Edit | Column Selection Mode.
The shortcut to turn it on/off is Alt+Shift+Insert. You navigate with arrow keys to select blocks of text.
Multiline Caret (without mouse)
Windows/Linux: CTRL + CTRL(Hold) + ↑ / ↓
Mac: ⌘ + ⌘(Hold) + ↑ / ↓
ESC will end multiline mode.
Change Multi-caret Hotkey
To add a custom Keymap, CTRL+SHIFT+A, type keymap and click on the one with Settings as subtext. Search for Clone Caret Above and Clone Caret Below.
I mapped mine to ALT+SHIFT+↑ / ↓.
Bonus
Try holding combinations of CTRL, SHIFT, and arrows for improved selection power.
It is also possible to select holding middle mouse key.
Go to the Settings | Keymap and set a shortcut for Clone Caret Above and for Clone Caret Below
Most convenient way is to:
MAC: Hold Option+Shift and click with mouse.
Windows: Hold Alt and click with mouse.
On a mac, to toggle block select on/off:
shift command 8
⇧⌘8
For me on Mac:
Press once 'option' key, release it, and press and hold it again.
Now navigate with cursor to select desired code.
Press 'Esc' to exit column mode! :)
I think #Meo's answer is the most correct, but if your hand happens to be on the mouse, you can also accomplish this with Ctrl+Alt+Shift+Left Mouse Button Click. Or look for the Add Rectangular Selection on Mouse Drag in the keymap settings.
In Windows or Linux I press two times Ctrl
For Mac cmd+shift+* didn't work for me. I changed the keymap to something else and now it works seamlessly.

How do I type CTRL + ] on a QWERTZ keyboard (in order to jump to a tag with Vim)?

In Vim, the usual way to jump to the definition of the keyword under the cursor is to type CTRL-] (as claimed by :he CTRL-\]).
But when you have a QWERTZ keyboard (see below, Strg is Ctrl), you're in some trouble: there is no separate ] key on the keyboard; you'll have to press ALT GR-9 to type the ]. So, to jump to a tag, it`s neccessary to hit CTRL-ALT GR-9 which doesn't work (and is also not feasible because you'll break your fingers if you happen to use that often).
So, how could I jump to a tag using my QWERTZ keyboard?
In addition, I'd also be glad if someone could explain why pressing CTRL-ALT GR-9 does not work.
Edit:
I'm not interested in the obvious answers "remap to something else" or "press the mouse button".
Duplicate on Vi/Vim: https://vi.stackexchange.com/questions/5732/tag-navigation-using-ctrl-does-not-work-with-non-english-keyboard-on-windows
As weird as it reads, on AZERTY keyboards (french layout specifically) $ is at the same spot as ] on QWERTY keyboards so I must hit <C-$> to jump to definition.
See if <C-+> does the trick.
On an AZERTY keyboard press:
ctrl shift 8 to go to List item
ctrl shift 7 to go from
The same in excel as
ctrl [
ctrl ]
On a QWERTZ mac keyboard Ctrl+option+6 worked for me. And jumping back worked as expected with Ctrl+T or Ctrl+O.

Resources