DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: DONE: ALT key down visual indicator (for when alt key is stuck)  (Read 24,491 times)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • Cody Award
i'm fighting my logitech mouse which likes annoying me by locking the ALT key down (i have alt + tab assigned to a mouse button and i suspect it doesn't release the alt key sometimes).

it would be helpful if i had some kind of warning, probably a tray icon, that indicated that the ALT key was held down (i could provide the icon for this, i'm thinking that a flashing red dot would be easy to identify).

i'm sure this is an autohotkey type problem so i appreciate that i could spend a few hours/days trying to figure it out - but i'm hoping one of you autohotkey masters will help out.

thanks.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: ALT key down visual indicator (for when alt key is stuck)
« Reply #1 on: May 02, 2010, 01:12 PM »
I only have this working with my left alt key, but how about something like:

Code: (autoit)
; icons adapted from:
;   Mark James
;   http://www.famfamfam.com/lab/icons/silk/
FileInstall, Up.ico, Up.ico
FileInstall, Down.ico, Down.ico
UpIconFileName = Up.ico
DownIconFileName = Down.ico
If GetKeyState("Alt")
{
  Menu, Tray, Icon, % DownIconFileName
}
Else
{
  Menu, Tray, Icon, % UpIconFileName
}
Loop
{
  KeyWait, Alt, D
  Menu, Tray, Icon, % DownIconFileName
  KeyWait, Alt, U
  Menu, Tray, Icon, % UpIconFileName
}

Edit: Here is a compiled version with icons.
« Last Edit: May 02, 2010, 01:32 PM by ewemoa »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • Cody Award
Re: ALT key down visual indicator (for when alt key is stuck)
« Reply #2 on: May 02, 2010, 01:43 PM »
perfect. i'd just finished adding some icons to the script when i saw the compiled version - so i've attached the icons i made to this post (maybe someone else will use them).

thanks, ewemoa. i'll send some DC credits later.

now i just need to see if i was right about my mouse messing with me.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Hope it's been working for you and you've made progress on your mouse issue :)

BTW, would you mind if I swapped in your icons and make those "official"?

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • Cody Award
Hope it's been working for you and you've made progress on your mouse issue :)

BTW, would you mind if I swapped in your icons and make those "official"?
yeah no problem. mouse seems to be working fine at the moment so not needed the script so much - i'm glad it's there for when i need it though.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Thanks!  I uploaded an updated version.

delwoode

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 146
Re: DONE: ALT key down visual indicator (for when alt key is stuck)
« Reply #6 on: April 06, 2011, 10:11 AM »
could you make an adapted version for my problem  :-[
I have used a couple of programs (since deleted) one was a calculator and it left the numlock down. this messed up my keys!  As i am on a laptop there is no light indicator so I didnt realize what the problem was. When I did realize I couldnt turn it off!  then I found out you have to press the Fn key and the numlock key together on a laptop.
a altered script that would alert me the numlock was on and offer to turn it off by pressing fn and numlock for you would be great. But would that be too hard for a laptop as maybe the scan codes vary for numlock? maybe a ini file where you could put in the scan codes for your pc?

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: DONE: ALT key down visual indicator (for when alt key is stuck)
« Reply #7 on: April 06, 2011, 03:17 PM »
As i am on a laptop there is no light indicator so I didnt realize what the problem was

You may find an app I developed, called kLED, useful:

http://skwire.dcmembers.com/wb/pages/software/kled.php

Original address: https://www.donationcoder.com/forum/index.php?topic=22603.0