Zero key stopped working

Get help with using AutoHotkey and its commands and hotkeys
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Zero key stopped working

02 May 2017, 09:39

I had recently used the zero key as a trigger for some small bits of script I had been testing but they have all been deleted but now my zero key does not work. Could this still be Autohotkey related? This is a desktop running Windows 7 and this is the zero that is in the main keyboard and not the number pad. The “Shift” + “0” key does produce “)” as expected. I have tried three different keyboards (all the same brand and type) with the same results. I have seen many posts using the FN key to correct this but I do not have that key. I have also tried staring Windows in safemode. Any ideals?
User avatar
Almost_there
Posts: 404
Joined: 30 Sep 2014, 10:32

Re: Zero key stopped working

02 May 2017, 15:13

Well, I'm not sure if I really got to know your problem. Is it that your keyboard seems to malfunctions, or is it that some ahk files is deleted? Or is it that the script is running, but won't produce the expected outcome?
On my keyboard Shift+0 out "=" because of language settings. Have you checked that your keyboard setting corresponds to the actual keyboard layout?
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 20:30

Thanks for taking the time to respond. I'm quite certain the keyboard is okay. I've swapped it with other computers and the problem always remains with this particular computer. Is there a chance that some AHK script could be running even though there is nothing in the system tray? If there is something I can't see that's running it is being restarted on its own when I boot my computer even in the safe-mode. How would I check to see if my keyboard settings correspond to the actual keyboard layout? I'm not finding a whole lot of settings for my keyboard. I have reloaded the keyboard drivers. The keyboard plug is the old round style plug. This evening I'm going to try a USB keyboard.
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 20:41

Update - the USB keyboard and drivers Windows loaded for it did NOT cure this problem.
magicinmath
Posts: 162
Joined: 12 Apr 2017, 23:03

Re: Zero key stopped working

02 May 2017, 20:49

Did you try turning it off and back on?
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 21:02

I have tried completely turning the computer off and back on as well as unplugging the USB keyboard and plugging it back in. Thanks
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zero key stopped working

02 May 2017, 21:24

On my PC, Shift+0 gives ) also.

To check if AHK scripts are still running, go to Task Manager, 'Processes' tab, and check the Command Line column. If that column isn't there, go to 'View, Select Columns...'.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 22:09

I did not see it under "Processes". I did see it under "View" , "Select Columns" and the "Command Lline" checkbox was NOT checked....Thanks
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 22:25

Does this confirm that this is not a a AHK issue?
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zero key stopped working

02 May 2017, 22:30

I thought it reasonably likely that an AHK script was somehow being opened and causing the issue with the 0 key. Are there no references to AutoHotkey scripts in the Command Line column?

You could add a 0 hotkey to your main script, and see if you get a 'Duplicate hotkey.' error.

[EDIT:] Btw sometimes people do experiments with software (not AutoHotkey) that cause more permanent keyboard changes to how the keyboard works. In case you used some other software that affected the keyboard.

[EDIT:] Check the key history. 'View, Key history and script info'. When you press 0.
Last edited by jeeswg on 02 May 2017, 23:03, edited 1 time in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
magicinmath
Posts: 162
Joined: 12 Apr 2017, 23:03

Re: Zero key stopped working

02 May 2017, 22:44

codude wrote:Does this confirm that this is not a a AHK issue?
Not sure. It's possible you've switched the Windows default language to some cultural dialect which still does not recognize the number 0.
nismo
Posts: 19
Joined: 22 Dec 2016, 13:57

Re: Zero key stopped working

02 May 2017, 23:00

I have the same issue, my default language it's spanish.
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 23:40

Am I looking in the right place here? I go to Windows task manager and select the "Processes" tab. Under "Images Name" I see AutoHotKey.exe when it shows I have AHK script running in my system tray and it goes away when I exit the script.
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

02 May 2017, 23:45

I'm checking some of your other recommendations now.

I tried adding another 0 hotkey and it is not coming up as a duplicate and it does actually run the script I assigned to it so I tried this and it did not work.

0::
Send 0
Return

I got this error “71 hotkeys have been received in the last 1139ms. Do you want to continue? If I double-click the script icon in the system tray I see “Send, 0 (0.01)” and “Return” repeated dozens of times.


Just trying to get back to work I tried adding this script thinking that I could use another key for zero. (I have the keypad reserved for other script)

=::
Send 0
Return

0::
Soundbeep 400
Soundbeep 800
Return


The soundbeeps were to remind me that I hit the 0 key. When I hit the = key I did not get the zero I actually got the two sound beep tones. I don’t know if any of this maybe offers a clue as to what is going on here.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zero key stopped working

03 May 2017, 00:03

To prevent 0 from sending itself, change your script to this:

Code: Select all

$0::
Send 0
Return
Re. your = hotkey:

Code: Select all

;without #UseHook, press = get beeps
;with #UseHook, press = get 0

#UseHook
=::
Send 0
Return

0::
Soundbeep 400
Soundbeep 800
Return
That that 0 sending itself hotkey worked suggests your 0 key is working though.

So if you type 0 in Notepad, for example, does it work?

Other points are: did you make any 0 hotkeys specific to a window, did you do anything with InputLevel, or the Input command, or hotstrings?
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

03 May 2017, 00:46

I tried your script but neither of them are working. When you speak of viewing the key history I'm thinking that might be what I see when I double-click the tray icon. In both cases I see "Send,0 (0.02)" but I get no zero in Notepad or Word. I may have used a zero hotkey to activate, maximize or minimize specific window by name. I can't say for sure but possibly I may have done some experimenting with an input command but the hotstrings does not seem familiar. Could any of this have an effect even if the script is not running? I have the exact same computer and set up at the office so I was going to compare some settings when I'm there in the morning. You have any ideals of what area I might focus on? I was going to check some of the language settings..Thanks
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

03 May 2017, 00:54

I've been told stay away from the Windows System Restore but would that be a possible solution for this problem?
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zero key stopped working

03 May 2017, 01:05

Btw one thing you could try is to just to close all AutoHotkey instances, via Task Manager if they lack a tray icon, and press 0.

I wouldn't touch System Restore, but I don't know much about it. I haven't ever touched any language settings, have you ever changed them?

I would press 0 and press 1 and compare what the key history says.

If a script is closed it shouldn't affect anything.

I can't think of anything in particular to test on another PC.

[EDIT:] You can go to the tray icon, click Open, and the go to 'View, Hotkeys and their methods', to see if 0 is listed there.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
codude
Posts: 107
Joined: 12 Nov 2015, 05:33

Re: Zero key stopped working

03 May 2017, 09:42

Btw one thing you could try is to just to close all AutoHotkey instances, via Task Manager if they lack a tray icon, and press 0.
>>In my task manager I see one instance of AutoHotKey.exe for each AHK icon showing in my tray. If I exit each icon I no longer see AutoHotKey.exe in my task manager. If a hidden AHK icon exist it would have to have a different name in the task manager I am not seen anything that looks like it would be relevant.

I wouldn't touch System Restore, but I don't know much about it. I haven't ever touched any language settings, have you ever changed them?
>>I have never change my language settings on purpose.

I would press 0 and press 1 and compare what the key history says.
>>Neither of these keys show any history.

[EDIT:] You can go to the tray icon, click Open, and the go to 'View, Hotkeys and their methods', to see if 0 is listed there.
>> I don't see zero listed.

I don't know if it could be possibly another program. For example in my Dragon Dictation software there are hotkeys that I confirmed did not use zero but maybe there are other programs running in the background. I can't help but wonder if the fact that I still have the problem when I start my computer in safe mode eliminates a lot of these factors including AHK. Is this not true? I did find a workaround to get me going for now. I have the zero key (the one between 9 and -) send {NumPad0}. I did not think this would work because when I'm running my script pressing the number pad 0 key does not produce a 0 because all of my number pad keys are disabled and reserved for hotkeys (although the 0 number pad key is not assigned). Thank-You
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zero key stopped working

03 May 2017, 13:24

Some other ideas, although personally I'm starting to run out of ideas, in case anyone has any more.

Nowadays keyboards have all sorts of arrangements, and keys with multiple roles. It may be that the 0 key has other functions, and you could try turning NumLock/ScrollLock/CapsLock on/off.

You could try closing AutoHotkey and other programs.

Btw, so Shift+0 is actually working as normal to give )?

Can you assign Ctrl+0 to send 0?

An example to check the key history:

Code: Select all

#Persistent
#InstallKeybdHook
Sleep 3000 ;press various keys while it's waiting, (including 0, shift+0, ctrl+0)
KeyHistory
return
List open scripts:

Code: Select all

;q:: ;list open scripts
DetectHiddenWindows, On
WinGet, vWinList, List, ahk_class AutoHotkey
vOutput := ""
Loop, % vWinList
{
	hWnd := vWinList%A_Index%
	WinGetTitle, vWinTitle, % "ahk_id " hWnd
	vOutput .= hWnd " " vWinTitle "`r`n"
}
Clipboard := vOutput
MsgBox, % vOutput
return
[EDIT:] Another idea is to try pressing 0 in a window that you know is Admin, e.g. RegEdit, because Admin windows won't be affected by hotkeys from non-Admin AutoHotkey scripts.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: Epialis, Google [Bot], swagfag, thut11, zhotkey and 43 guests