How to switch between two languages by using Right Alt+Shift

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ahmed142
Posts: 19
Joined: 19 May 2022, 08:55

How to switch between two languages by using Right Alt+Shift

Post by Ahmed142 » 19 May 2022, 09:24

Hello,

I use two languages, English and Arabic. In Windows if I want to change the language there is an option with Left Alt+Shift, and I don't find any option to switch between languages with Right Alt+Shift.

so, is there any script in AutoHotkey to switch between two languages by using Right Alt+Shift?

iPhilip
Posts: 796
Joined: 02 Oct 2013, 12:21

Re: How to switch between two languages by using Right Alt+Shift

Post by iPhilip » 19 May 2022, 15:26

@Ahmed142, does this work?

Code: Select all

RAlt & Shift::
{
   KeyWait "RAlt"
   Send "{Alt down}{Shift}{Alt up}"
}
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)

Ahmed142
Posts: 19
Joined: 19 May 2022, 08:55

Re: How to switch between two languages by using Right Alt+Shift

Post by Ahmed142 » 20 May 2022, 04:43

iPhilip wrote:
19 May 2022, 15:26
@Ahmed142, does this work?

Code: Select all

RAlt & Shift::
{
   KeyWait "RAlt"
   Send "{Alt down}{Shift}{Alt up}"
}
Hello mister iPhilip

I tried this code and it doesn't work, there was an error, see the following pictures:
image.png
image.png (33.15 KiB) Viewed 1702 times
image.png
image.png (23.16 KiB) Viewed 1702 times


I use AutoHotkey v1 (v1.0.48.05 64-bit ANSI). Then I use Windows 11.
Last edited by Ahmed142 on 20 May 2022, 05:02, edited 1 time in total.

iPhilip
Posts: 796
Joined: 02 Oct 2013, 12:21

Re: How to switch between two languages by using Right Alt+Shift

Post by iPhilip » 20 May 2022, 10:52

@Ahmed142, you received the error because you are trying to run code written for AutoHotkey v2 under AutoHotkey v1. Since you posted your request for help in this forum (AutoHotkey v2 Help), I posted AutoHotkey v2 code. If your environment is AutoHotkey v1, you can use this code.

Code: Select all

RAlt & Shift::
   KeyWait RAlt
   Send {Alt down}{Shift}{Alt up}
return
I recommend you upgrate to the latest version of AutoHotkey v1 (v1.1.34.02).
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: How to switch between two languages by using Right Alt+Shift

Post by BoBo » 20 May 2022, 10:55

I use AutoHotkey v1 (v1.0.48.05 64-bit ANSI). Then I use Windows 11.
Thread will be moved to the AHK V1 Help section.

ahk7
Posts: 574
Joined: 06 Nov 2013, 16:35

Re: How to switch between two languages by using Right Alt+Shift

Post by ahk7 » 20 May 2022, 11:38

You might better try use a function viewtopic.php?f=6&t=18519 :?:

Ahmed142
Posts: 19
Joined: 19 May 2022, 08:55

Re: How to switch between two languages by using Right Alt+Shift

Post by Ahmed142 » 20 May 2022, 14:50

iPhilip wrote:
20 May 2022, 10:52
@Ahmed142, you received the error because you are trying to run code written for AutoHotkey v2 under AutoHotkey v1. Since you posted your request for help in this forum (AutoHotkey v2 Help), I posted AutoHotkey v2 code. If your environment is AutoHotkey v1, you can use this code.

Code: Select all

RAlt & Shift::
   KeyWait RAlt
   Send {Alt down}{Shift}{Alt up}
return
I recommend you upgrate to the latest version of AutoHotkey v1 (v1.1.34.02).
Thank you mister iPhilip for your second reply

First: this script seems works, but I discovered that my problem is with other thing and Right Alt+Shift was working with windows 11, and I was wrong that Right Alt+Shift doesn't work in Windows 11 because it works but my problem is with keyboard layout because every time in a specific case I switch between languages the keyboard layout appears for a moment and that annoying for me so maybe I post other post for that problem in future.

Second: Thank you for your recommendation I downloaded the latest version.
Last edited by Ahmed142 on 21 May 2022, 03:15, edited 1 time in total.

Ahmed142
Posts: 19
Joined: 19 May 2022, 08:55

Re: How to switch between two languages by using Right Alt+Shift

Post by Ahmed142 » 20 May 2022, 14:56

BoBo wrote:
20 May 2022, 10:55
I use AutoHotkey v1 (v1.0.48.05 64-bit ANSI). Then I use Windows 11.
Thread will be moved to the AHK V1 Help section.
I suggest to delete this thread and delete my original post because I was wrong and Right Alt+Shift is working in Windows 11 for switching between two languages, and my problem is with other thing.

Post Reply

Return to “Ask for Help (v1)”