Notepad: Right Ctrl+Shift Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Dmitry_N
Posts: 2
Joined: 27 Mar 2024, 01:12

Notepad: Right Ctrl+Shift

27 Mar 2024, 01:28

Hi there,

Newbie here. Knowledge level of Autohotkey is zero.

In Windows 11 (didn't have this problem before), in Notepad, the combination of Ctrl+right Shift turns on right to left reading order.

Can a simple script for AHK v2 be created to emulate the left Shift when I press the right Shift? For Notepad only.

I need this combination to be able to switch languages. I'm left-handed and I've been using this key combination since the nineties.

What I've tried so far is seeking advice with Google search; I also "spoke" with Gemini, ChatGPT, and Copilot. They are too smart for Windows, I guess, as none of their offered scripts work. They want me to help them find issues in their scripts instead :)

Thanks so much in advance.
Noitalommi_2
Posts: 224
Joined: 16 Aug 2023, 10:58

Re: Notepad: Right Ctrl+Shift

27 Mar 2024, 03:39

Hi.

Like so? Switching RShift to LShift and vice versa?

Code: Select all

#Requires AutoHotkey 2.0
#SingleInstance

#HotIf WinActive("ahk_exe Notepad.exe")
*RShift::LShift
*LShift::RShift
#HotIf
Dmitry_N
Posts: 2
Joined: 27 Mar 2024, 01:12

Re: Notepad: Right Ctrl+Shift

27 Mar 2024, 04:02

Noitalommi_2 wrote:
27 Mar 2024, 03:39
Hi.

Like so? Switching RShift to LShift and vice versa?

Code: Select all

#Requires AutoHotkey 2.0
#SingleInstance

#HotIf WinActive("ahk_exe Notepad.exe")
*RShift::LShift
*LShift::RShift
#HotIf
Hi,

Thanks so much! It just works. But I managed to get a working script from Copilot, for which Gemini was really grateful. It seems I started working to transfer knowledge bases from one to another :)
I might use yours anyway, but will remove this *LShift::RShift, as I don't need the left key to be remapped.

What Copilot created is:

Code: Select all

#Requires AutoHotkey v2.0

#HotIf WinActive("ahk_exe notepad.exe")
RShift::LShift
#HotIf
Can you explain what the difference is between this and yours? Not so important for me, but I'm just curious.

Thank you so much again!

PS: I cannot find a button to express my gratitude here :) I am kind of used to hit some "Like" buttons, which seem to transfer my gratitude in the right direction.
Noitalommi_2
Posts: 224
Joined: 16 Aug 2023, 10:58

Re: Notepad: Right Ctrl+Shift  Topic is solved

27 Mar 2024, 06:45

The difference is that in my script there is an asterisk before the hotkey, this allows to activate the hotkey even if extra modifiers like Ctrl are being held down.
More explanation here: Hotkey Modifier Symbols
gregster
Posts: 9035
Joined: 30 Sep 2013, 06:48

Re: Notepad: Right Ctrl+Shift

27 Mar 2024, 19:54

It's just that RShift::LShift is not a hotkey, but a remapping... so it should already allow additional modifier keys to be held down, and * would be redundant in this case, afaics.
Noitalommi_2
Posts: 224
Joined: 16 Aug 2023, 10:58

Re: Notepad: Right Ctrl+Shift

28 Mar 2024, 03:58

gregster wrote:
27 Mar 2024, 19:54
It's just that RShift::LShift is not a hotkey, but a remapping... so it should already allow additional modifier keys to be held down, and * would be redundant in this case, afaics.
Yes, that's right. I wasn't aware of that.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: No registered users and 168 guests