Simulating a right Ctrl key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AHKxx
Posts: 75
Joined: 26 Feb 2014, 01:37

Simulating a right Ctrl key

03 Jan 2018, 01:53

Hello and Happy New Year!

I will soon be using a Surface Pro 4, which does not have a right Ctrl key.

Would AHK let me set up the combined right Alt key, with the Menu key, so that when those two were pressed together, along with another key, e.g., a 'c' key, it would result in a Ctrl-C being passed?

I know a bit about how to use the Menu key with AHK, e.g.:

Code: Select all

RAlt & SC15D::MsgBox Right Alt + Menu key
But I don't see how to use that in a script that would have to receive any key at all as the the third key for the command. (Wouldn't want to use an input box for the third key. I want it to work just like a regular Ctrl key.)

Is this possible?

Thank you!
Rindis
Posts: 213
Joined: 23 Dec 2013, 13:58
Location: Norway
Contact:

Re: Simulating a right Ctrl key

04 Jan 2018, 09:24

Modified from:
https://autohotkey.com/board/topic/4838 ... mbination/

hold the menu button down while pressing ralt and c

Code: Select all


RAlt & c::
If GetKeyState("SC15D","P")
	MsgBox Right Alt + Menu key + c
return

esc::ExitApp


TAC109
Posts: 1111
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Simulating a right Ctrl key

04 Jan 2018, 20:45

These are the remappings I use on my SP4. The first two lines changes the Apps key into Ctrl, while shift+Apps can be used to get Apps. The third line allows me to press alt+F4 to close an application without having to press Fn.

Code: Select all

+AppsKey::AppsKey
 AppsKey::Ctrl
!Volume_Mute::!F4
Hope this helps.
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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Theda, w_i_k_i_d and 273 guests