My script:
#MenuMaskKey vkFF
#SingleInstance Force
SendMode Input
SetTitleMatchMode Regex
#IfWinActive ahk_exe (chrome|msedge).exe
!l::Send ^{Tab}
#IfWinActive
In Chrome, when using !l with the left alt, ctrl+tab is sent without side effects, however, if using !l with the right alt instead, ctrl+tab is sent and the ctrl key is never released, if I press j after that, the download page will be opened.
Does anyone know the root cause of this behavior and how to fix this?
AHK version: 1.1.33.10
Related
I pressed some shortcut on the keyboard accidentally that now when I edit a text file, if I press left arrow key once, it goes to beginnnig of line, and when I press right arrow key it goes to the end of the line.
Do you know how to fix it?
Seems that your alt gr is stuck.
Try to use another keyboard or the on-screen keyboard to see if the problem occurs.
I have the following map:
>!+a::SendInput,+{Delete}
It's supposed to send Ctrl+Delete (delete word after cursor) when I press RightAlt+Ctrl+a but instead it's sending a Ctrl+Alt+Delete signal so it's bringing up the Windows 7 menu of shutdown, start task manager etc.
How can I send the right signal?
Appreciate any help!
The problem you are facing is that Ctrl + Alt + Delete is hard coded and is uninterruptible. There's simply no way around it, if you press that sequence, even with the Command BlockInput enabled, Windows will re-enable input and execute the command...
Try:
>!^a:: ; + symbol is Shift ^ represents Ctrl key
KeyWait, RAlt ; Waits for Right Alt to be released before Ctrl Delete is sent
SendInput,{Ctrl Down}{Delete}{Ctrl Up}
Return
An alternative although it works the exact same way:
>!^a::
While (GetKeyState("RAlt", "P"))
Continue
SendInput,{Ctrl Down}{Delete}{Ctrl Up}
Return
I'll continue to pursue other options.. at the moment I can I think of no better way to do this.
I can't seem to find the exact keyboard shortcut I'm looking for.
When I do a "Find in Files" (Ctrl + Shift + F), the keyboard navigation automatically jumps to the Find results, and I can navigate the results with the arrow keys; the code editor window updates itself as I do so, and pressing Enter pops me from the Find Results Window to the code editor Window.
Now, this is great for the initial search, but what if I want to bounce back and forth, say, if I need to make changes around a few different places in my find results?
Is there a keyboard shortcut to jump back from the code editor window to the find results?
I'm using MSVS 2013, if it matters.
If you have the General Development keyboard scheme, try: Alt + F6.
This is bound to the Window.NextPane which is where you just came from, so it should take you back.
Also, Alt + F7 is Window.NextToolWindowNav which pops up a nav selection which makes it easy to move around. This nav selection is the same one for Ctrl + Tab which, once open, can be navigated up, down, left and right via arrow keys.
I've made simple remapping of CapsLock to Control with autohotkey:
Capslock::Control ; make Caps Lock the control button
This works OK, but in Emacs if I need to do a key sequence like Ctrl-x Ctrl-f while holding the CapsLock key continuously the whole time what gets registered is Ctrl-x f. In order to get the correct sequence I now have to release CapsLock between the keystrokes like Ctrl-x <release> Ctrl-f which is very inconvenient.
Is there a way to do the rebinding so that holding CapsLock down will work exactly as holding down the Control button?
I've also tried the following snippet without success:
#IfWinActive ahk_class Emacs
{
CapsLock::
Sendinput {Ctrl Down}
KeyWait, CapsLock
Sendinput {Ctrl Up}
return
}
Using Send or Sendplay in the above instead of Sendinput also doesn't solve my problem.
My system:
Windows 7 32bit
AHK v1.1.13.01
Emacs 24.3
Thank you!
I'm not sure why it's not working correctly for you. I added your remapping into my existing script and it seems to work fine. Can you post more of what you have? I have the following commands at the top of mine but I wouldn't think they should affect your problem.
#Persistent
#SingleInstance, Force
The commands GetKeystate
and SetKeyDelay might be helpful.
This is what I use and it works:
*Capslock::LCtrl
The asterisk is documented in the help under Keyboard Control > Hotkeys and Hotstrings:
Wildcard: Fire the hotkey even if extra modifiers are being held down. This is often used in conjunction with remapping keys or buttons. For example:
*#c::Run Calc.exe ; Win+C, Shift+Win+C, Ctrl+Win+C, etc. will all trigger this hotkey.
*ScrollLock::Run Notepad ; Pressing Scrolllock will trigger this hotkey even when modifer key(s) are down.
This symbol is ignored on Windows 95/98/ME.
I actually have this one too, +Caps Lock, if I really want caps lock:
<#Capslock::Capslock
Try this;
SetCapsLockState, AlwaysOff
CapsLock:: SendInput, {LCtrl Down}
Capslock Up:: SendInput, {LCtrl Up}
In a win32 message handler I'd like to be able to handle Left and Right Alt and Control keys. Left and Right is distinguished with bit 24 of lParam, but when I press the Right Alt then I also get a message for Left Control key (Right Alt is therefore "alt gr"). Is there a way to switch off this behavior or somehow distinguish the message for the Left Control key that was triggered by the Right Alt key?
I just hit this issue and found that Keyboard Language had United States-International keyboard selected. Switching that fixed the issue.
I figured it out thanks to Dell - Right Alt click does not work
Read about reading the keyboard states using Msdn GetKeyState
Then call GetKeyState() and use the VK of VK_LSHIFT VK_RSHIFT VK_LCONTROL VK_RCONTROL VK_LMENU VK_RMENU to see if it is pressed or not.