Hi I am new to autohotkey and think that i have messed up the functionality of my windows and alt keys with AHK. Can you please help me figure out how to disable AHK commands or figure out any other way to fix this?
A few months ago I downloaded AHK and set up a AHK ‘macro’ to make it so that it disabled the windows key on my keyboard when I was playing a game, so that it wouldn’t switch windows when i accidentally hit it while playing a game. For the past few months, my windows key and ALT key have not been working to allow me to quickly search the start menu and quick access menu in the bottom left corner of screen. I can still click on the icons in the bottom left corner, but the keyboard shortcut does not work anymore to bring it up. Also, these keys still seem to work fine for other functions- for example I can still use Windows key + tab to bring up the window switcher, its just that the windows key alone won’t bring up the start menu.
Is there any way to see all of the AHK scripts/macros that are currently in effect? If so, how? And how would i disable them?
Also, I’m not exactly sure if this AHK script is what caused the issue- it could have been a different thing that I don’t remember doing with AHK or maybe some other Windows 10 setting that I accidentally changed too. Is there anything else that I should try/do to fix this and make these keys work like normal? How?
Thanks!
Also, for more information, here is a post that I wrote a few months ago when I was originally trying to figure this out. I forgot to send it out at the time and now I don’t totally remember all the details, but this provides more detail into the AHK command that I used and what I was trying to do. Would also appreciate any advice about the questions at the end.
I’m trying to use this AutoHotKey to automatically disable the windows key whenever I am playing a game, can you please help?
I tried following the instructions to disable the windows key at the beginning of this article ( https www.howtogeek.com /194811/how-to-prevent-the-windows-key-alttab-and-sticky-keys-from-ruining-your-gaming/ Broken Link for safety ). It’s the first time I’m using AutoHotKey so maybe missing something simple.
I created a new AHK file on my desktop and pasted this text then saved.
; Disable Alt+Tab
!Tab::Return
; Disable Windows Key + Tab
#Tab::Return
; Disable Left Windows Key
LWin::Return
; Disable Right Windows Key
RWin::Return
Now, these keys are disabled . I have a couple questions.
How can I re-enable these keys?
I want to set it up so that these keys are automatically disabled while certain apps (ie fortnite, league of legends, etc) are open and enabled when they are not at the front. I also want to make it so I can access the function of the windows key with a different key or key combination that is more out of the way on the keyboard/.. How can I do this?
How to disable changes made with AutoHotKey? Accidentally disabled windows and alt key?
Re: How to disable changes made with AutoHotKey? Accidentally disabled windows and alt key?
try this
Code: Select all
F4::
Active := !Active
return
#if Active
; Disable Alt+Tab
!Tab::Return
; Disable Windows Key + Tab
#Tab::Return
; Disable Left Windows Key
LWin::Return
; Disable Right Windows Key
RWin::Return
#if
![Waving :wave:](./images/smilies/icon_wave.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
Re: How to disable changes made with AutoHotKey? Accidentally disabled windows and alt key?
AHK hotkeys are only active while the AHK script is running that defines them. That means, if you reboot your computer, all AHK hotkeys will be gone from memory.tacotime wrote: ↑12 Jun 2019, 14:47Is there any way to see all of the AHK scripts/macros that are currently in effect? If so, how? And how would i disable them?
Also, I’m not exactly sure if this AHK script is what caused the issue- it could have been a different thing that I don’t remember doing with AHK or maybe some other Windows 10 setting that I accidentally changed too. Is there anything else that I should try/do to fix this and make these keys work like normal? How?
An exception would be if you put a script into your computer's startup folder - in this case remove it. Then reboot or close all running Autohotkey.exe processes in Windows's task manager.
Now, there are sometimes people who used third-party software like KeyTweak to make changes to the registry - these hotkeys will still be in effect after a reboot. I think, running this program (or whatever you used) again will allow you to identify and remove these hotkeys...
Re: How to disable changes made with AutoHotKey? Accidentally disabled windows and alt key?
Thank you.
Did i do something wrong or miss something?
I was also wondering if there is a command for "enabling" these keys rather than 'disabling', but i couldn't figure out how to do that. Is that what this script is supposed to do? Or is there anything else I should try?
I just tried this and wasn't able to fix it. Not sure if I did it correctly. I copied all of the code that you provided into a new autohotkey script that I created on my desktop (after right clicking the desktop and selecting new autohotkeyscript, then right clicking the file and selecting "edit script"). Then I saved the file and right clicked the file on the desktop again to compile it and then "run script". Nothing happened and the modifier keys still are unresponsive.YoucefHam wrote: ↑12 Jun 2019, 15:02try this
Code: Select all
F4:: Active := !Active return #if Active ; Disable Alt+Tab !Tab::Return ; Disable Windows Key + Tab #Tab::Return ; Disable Left Windows Key LWin::Return ; Disable Right Windows Key RWin::Return #if
Did i do something wrong or miss something?
I was also wondering if there is a command for "enabling" these keys rather than 'disabling', but i couldn't figure out how to do that. Is that what this script is supposed to do? Or is there anything else I should try?
Re: How to disable changes made with AutoHotKey? Accidentally disabled windows and alt key?
Thank you. The problem still persists after I reboot the computer, so I'm not sure what the issue is. I don't remember if i put the script in the startup folder, but I don't think that I did. I just checked the task manager and the only thing that I see is a background process called AutoHotKey Unicode 64-bit. I tried ending that process but the modifier keys are still not working now. I looked at the rest of the list but don't see anything else related to AutoHotKey (though i couldnt figure out how to search the task manager so its possible that i missed it somewhere?).gregster wrote: ↑12 Jun 2019, 15:45AHK hotkeys are only active while the AHK script is running that defines them. That means, if you reboot your computer, all AHK hotkeys will be gone from memory.tacotime wrote: ↑12 Jun 2019, 14:47Is there any way to see all of the AHK scripts/macros that are currently in effect? If so, how? And how would i disable them?
Also, I’m not exactly sure if this AHK script is what caused the issue- it could have been a different thing that I don’t remember doing with AHK or maybe some other Windows 10 setting that I accidentally changed too. Is there anything else that I should try/do to fix this and make these keys work like normal? How?
An exception would be if you put a script into your computer's startup folder - in this case remove it. Then reboot or close all running Autohotkey.exe processes in Windows's task manager.
Now, there are sometimes people who used third-party software like KeyTweak to make changes to the registry - these hotkeys will still be in effect after a reboot. I think, running this program (or whatever you used) again will allow you to identify and remove these hotkeys...
I don't think that I used Keytweak or any other thrid party software to change these keys. I don't remember ever hearing about Keytweak before.
I also just searched my computer for all files with the extension AHK to see if i could find a past autohotkey script that might be causing this, but I don't see a script that looks like it has anything to do with this. There are only 3 other files (before a test file that i made today), and each of them seem to be preset tutorial or template type of scripts that are way longer and that I don't think that I ever used. Here is the scripts that I found - https www.dropbox.com /s/ipvezgn5taotrhi/Screenshot%202019-06-12%2017.24.57.png?dl=0 Broken Link for safety
Do you think that it is an AHK script that's causing this or something else? What do you think is the best step to take next?
Re: How to disable changes made with AutoHotKey? Accidentally disabled windows and alt key?
If your startup folders (current user and 'all users') are empty (no AHK script or file shortcut to one) and you exited all running AHK scripts (use right-clicks on AHK icons in system tray (if available) and task manager or reboot (if there are no icons, but running AHK processes)), it must be something else... ideally, you would remember what you did and reverse that.
Check also for suspicious programs in task manager. But if you find a "background process called AutoHotKey Unicode 64-bit" after a reboot, you should definitely look into your startup folder(s) (see, for example here, https://www.thewindowsclub.com/startup-folder-in-windows-8, to find out how to find it).
This AHK process won't just run on itself after a reboot - it get's started somewhere (I hope you got your AHK version (and scripts) from this website here and not from malicious sources).
Anyway, closing this process should exit the script - if the remappings are still active after this, there must be some other explanation than AHK.
But since I've never been in this situation (I exclusively use AHK hotkeys for 12+ years now), I have no personal experience in tracking such (registry) changes.
Otherwise, you will have to search the registry somehow - this is not AHK-related and probably information can be found on Google about this (you should be careful when you edit the registry yourself, though) - or possibly try to run some tool like KeyTweak and see if it reports relevant active hotkeys and if yes, remove them.
Perhaps someone helps has another idea...
Btw, the ahk files you found are most likely unrelated to this (Installer and Window Spy are standard scripts included with AHK that don't remap any keys, Template is probably only the default script that you get, if you choose 'New Autohotkey script').
But of course, you could have compiled some AHK script into an .exe-file and put it, for example, into startup ?! Look out for these, too!
Check also for suspicious programs in task manager. But if you find a "background process called AutoHotKey Unicode 64-bit" after a reboot, you should definitely look into your startup folder(s) (see, for example here, https://www.thewindowsclub.com/startup-folder-in-windows-8, to find out how to find it).
This AHK process won't just run on itself after a reboot - it get's started somewhere (I hope you got your AHK version (and scripts) from this website here and not from malicious sources).
Anyway, closing this process should exit the script - if the remappings are still active after this, there must be some other explanation than AHK.
But since I've never been in this situation (I exclusively use AHK hotkeys for 12+ years now), I have no personal experience in tracking such (registry) changes.
Otherwise, you will have to search the registry somehow - this is not AHK-related and probably information can be found on Google about this (you should be careful when you edit the registry yourself, though) - or possibly try to run some tool like KeyTweak and see if it reports relevant active hotkeys and if yes, remove them.
Perhaps someone helps has another idea...
Btw, the ahk files you found are most likely unrelated to this (Installer and Window Spy are standard scripts included with AHK that don't remap any keys, Template is probably only the default script that you get, if you choose 'New Autohotkey script').
But of course, you could have compiled some AHK script into an .exe-file and put it, for example, into startup ?! Look out for these, too!
Who is online
Users browsing this forum: No registered users and 171 guests