Hi. I am using a new device that does not have a right side Ctrl key. It does have a standard right side Alt key and a standard "right click" context menu key.
Is it possible to use those two keys together to function as a Ctrl key in combination with another randomly variable key, to send standard commands like Ctrl+C, Ctrl+V, etc?
If so, could that alt+menu combo then be combined with the Win, left Shift, and left side Alt key to output, e.g., Ctrl(alt+menu)+Shift+V.
I'm sure I'm not the first person to ask about this.
Thanks!
Simulating a Ctrl key
Re: Simulating a Ctrl key
Code: Select all
AppsKey::AppsKey
AppsKey & RAlt::Ctrl
Re: Simulating a Ctrl key
Thank you!
That didn't work or do anything that I was able to notice. But I had previously used a scan code for the menu key, and when I substituted that for AppsKey in your code, it worked!
But it is dependent on the keys being pressed in that order. And when I swap their order in the code, it no longer works. Any way to do it so that it also works when the Alt key is pressed first?
That didn't work or do anything that I was able to notice. But I had previously used a scan code for the menu key, and when I substituted that for AppsKey in your code, it worked!
Code: Select all
SC15D::SC15D
SC15D & RAlt::Ctrl
But it is dependent on the keys being pressed in that order. And when I swap their order in the code, it no longer works. Any way to do it so that it also works when the Alt key is pressed first?
Re: Simulating a Ctrl key
I had a similar problem on my laptop, and use this code:It is a bit different from what you requested, but as I don’t need the AppsKey function very much, it is more convenient.
Code: Select all
+AppsKey::AppsKey ; Shift + AppsKey => AppsKey
AppsKey::Ctrl ; AppsKey => Ctrl
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Re: Simulating a Ctrl key
Code: Select all
>!AppsKey::Ctrl
#If GetKeyState("AppsKey", "P")
$AppsKey Up::
Sleep, 100
Send {AppsKey up}
Return
*x::
*c::
*v::Send % "^" SubStr(A_ThisHotkey, 0)
#If