-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTRL key 'stuck' #75
Comments
hey @cesera @michal-murawski-90poe , did you find a workaround to this by any chance? I even remapped my CapsLock key to F8 with PowerToys, so im technically using F8 as a trigger (as far as AHK is concerned) and im still facing the issue |
I use the WIN key as my modifier and have the same issue. (Just to confirm your issue) |
I would recommend just going with Dexpot. See my comment |
And I tested it right now and CAN NOT recommend it. (Link to software) Dexpot looks like a "experimental virtual desktop implementation" for Windows 7. And it is. Virtual desktops back then havent existed yet (except for sane operating systems like Linux). Dexpot seems to function exactly like that: It only shows/hide certain windows instead of switching desktops. At least it did for me, if I didnt see an option for Win 10/11 integration. It does NOT use the native virtual desktop implementation of Win 11 and therefore fucks a bit with the system. Yes, it seems like it solves the problem, But in reality it doesnt and the experimental "virtual" desktop implementation of Dexpot has its drawbacks. |
Can you elaborate a little bit on why using the I don't mind to change my opinion, that's why I'm asking why native vs virtual would matter in this case. For me it has done the following:
And these are only the things I've use. There are even more features and plugins. ; Thanks
; https://www.autohotkey.com/boards/viewtopic.php?t=20661
; ASCII chars
; https://homepage.cs.uri.edu/faculty/wolfe/book/Readings/R02%20Ascii/completeASCII.htm
; More chars
; https://github.com/nuj123/AutoHotKey/blob/master/misc/Typing%20Accents%20-%20Emulating%20Macs
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance Force ; The script will Reload if launched while already running
#KeyHistory 0 ; Ensures user privacy when debugging is not needed
; #Warn ; Enable warnings to assist with detecting common errors.
; SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; SetKeyDelay, 0
CapsLock::
KeyWait, CapsLock
If (A_PriorKey="CapsLock")
SetCapsLockState, % GetKeyState("CapsLock","T") ? "Off" : "On"
Return
#If, GetKeyState("CapsLock", "P") ;Your CapsLock hotkeys go below
; á/Á
A() {
if (A_PriorHotKey = "CapsLock" && A_ThisHotkey = "a") {
Send {Asc 0225} ; á
}
else if (A_ThisHotkey = "+a") {
Send {Asc 0193} ; Á
SetCapsLockState,Off
}
else{
MsgBox, Current shortcut is: %A_ThisHotkey%
MsgBox, Previous shorcut was: %A_PriorHotKey%
}
}
; é/É
E() {
if (A_PriorHotKey = "CapsLock" && A_ThisHotkey = "e") {
Send {Asc 0233} ; é
}
else if (A_ThisHotkey = "+e") {
Send {Asc 0201} ; É
SetCapsLockState,Off
}
else{
MsgBox, Current shortcut is: %A_ThisHotkey%
MsgBox, Previous shorcut was: %A_PriorHotKey%
}
}
; í/Í
I() {
if (A_PriorHotKey = "CapsLock" && A_ThisHotkey = "i") {
Send {Asc 0237} ; í
}
else if (A_ThisHotkey = "+i") {
Send {Asc 0205} ; Í
SetCapsLockState,Off
}
else{
MsgBox, Current shortcut is: %A_ThisHotkey%
MsgBox, Previous shorcut was: %A_PriorHotKey%
}
}
; ó/Ó
O() {
if (A_PriorHotKey = "CapsLock" && A_ThisHotkey = "o") {
Send {Asc 0243} ; ó
}
else if (A_ThisHotkey = "+o") {
Send {Asc 0211} ; Ó
SetCapsLockState,Off
}
else{
MsgBox, Current shortcut is: %A_ThisHotkey%
MsgBox, Previous shorcut was: %A_PriorHotKey%
}
}
; ú/Ú
U() {
if (A_PriorHotKey = "CapsLock" && A_ThisHotkey = "u") {
Send {Asc 0250} ; ú
}
else if (A_ThisHotkey = "+u") {
Send {Asc 0218} ; Ú
SetCapsLockState,Off
}
else{
MsgBox, Current shortcut is: %A_ThisHotkey%
MsgBox, Previous shorcut was: %A_PriorHotKey%
}
}
; ñ/Ñ
N() {
if (A_PriorHotKey = "CapsLock" && A_ThisHotkey = "n") {
Send {Asc 0241} ; ñ
}
else if (A_ThisHotkey = "+n") {
Send {Asc 0209} ; Ñ
SetCapsLockState,Off
}
else{
MsgBox, Current shortcut is: %A_ThisHotkey%
MsgBox, Previous shorcut was: %A_PriorHotKey%
}
}
a::A()
+a::A()
e::E()
+e::E()
i::I()
+i::I()
o::O()
+o::O()
u::U()
+u::U()
n::N()
+n::N() |
You can just use my fork (there's also a PR for this fix). It works fine in windows 11 |
Thanks mate! The "WIN key stuck error" didn't occure for now, I have to have an eye on that longer, but for now it looks very good! Link to his PR in this repo: #84 |
Just came back after a few weeks: This fix works, haven't had the stuck-key-problem since I used this. |
I am using CTRL as the modifier key (so it works the same as my linux desktop), but most of the time I switch desktops the system acts like I keep the CTRL key pressed. To release it I just have have to press it again, but this behaviour is a bit of a pain.
Any ideas?
The text was updated successfully, but these errors were encountered: