Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 03, 2015, 07:53:37 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: systray keyboard lights  (Read 15446 times)

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
IDEA: systray keyboard lights
« on: June 29, 2006, 05:43:06 PM »
This Microsoft Wireless Comfort Keyboard is made by Microsoft (which I don't necessarily care for), it's wireless (which doesn't necessarily impress me all that much) and it's comfortable (which is the reason I bought it)

My problem with it is that it doesn't have any lights to indicate the status of "scroll/num/caps lock". Originally, when running explorer.exe as my shell, it would pop up a sign next to the system tray indicating "scroll lock is on" or "caps lock is off" (or whatever) but there are a coupla problems: 1) the 'sign' would only stay up for a second (after a while there would be no way to tell whether numlock was on without T&E  and B) I don't use explorer.exe as a shell and, whereby this keyboard, being a microsoft product, won't play nicely with any other brands, there is no way to tell anyway.. ever

That's my problem. I want a utility that will indicate (preferably through a tray icon) the status of my keystates (numlock on, scroll lock off etc)

This program is one example (there are, no doubt, many others) but I would prefer a few things over all other such programs that I've seen. I would like to also have "F-Lock" capabilities and the trayicon should be one icon with four different states instead of four separate icons (I would be willing, if necessary, to design/create the icons for any programmer that will accept this project - just tell me the required attributes)

If anybody knows of a piece of software (freeware/open-source) that I have missed that fits my requirements, please point it out.

Otherwise, will somebody be willing to make it? Is there any way to possibly do this with AHK?

thanks,
-Dan
:)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #1 on: June 29, 2006, 05:53:49 PM »
Hi dan!
It looks like you're one the only one with that problem!
This had already been requested, here's the thread link: http://www.donationc...dex.php?topic=2454.0
There are a bunch of solutions in that thread. If they don't fit you, please tell here what you'd like the program to do, that the ones mentioned can't do.

The problem with doing it in ahk, is that to have 3 icons in the systray, you'd have to have 3 scripts running (afaik), which means about 3*4mb of memory used for a simple program. Nevertheless, it can be done, and if you'd like other ways of implementing it, it'd be no problem. Right now, from the top of my head, i thought of the possibility of having it display the key states on the title of each window! (a bit like skrommel's TicTocTitle).

What do you think?

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #2 on: June 29, 2006, 07:29:31 PM »
Thank you, jgpaiva, for your quick reply.

I have tried 'Systray Indicator' and 'Keystate' as recommended in that thread you pointed out (sorry for my oversight).

I was not able to download Toggle Keys Indicator from the AHK forum and I don't know what that last post was but I couldn't get any page on that site nor could Google tell me any reasonable information about 'lockdown' from 'csisoft').

The problem that I have with these is that they're multiple icons and they can't do F-lock (is F-lock status retrievable?) Those are two requests by 'alexp' that were left unanswered in that thread

I would like one icon (a quartered square with the symbols 'F', 'C', 'S' and 'N', perhaps) that can show the status of all four keys mentioned ('N' is lighted while 'F', 'C' & 'S' are greyed out if only [num lock] is on etc)

possible? plausible? probable?

<edit>Yeah, I'm not too keen on the idea of 'titlebar display' for something like this (or much of anything, really). I like a lot of skrommel's stuff but not that one so much. There was something one time I didn't get that I think might've been really useful if I ever find it again and that was extra buttons next to the minimize/restore/close that allow for transparency/'minimize to tray' and something else.

Anyway, tray icon would be best (only one multifunction icon) otherwise just a little stand-alone utility that I could start and it would display the status of said buttons would be suitable too.

thanks again!</edit>
:)
« Last Edit: June 29, 2006, 07:37:02 PM by prosayist »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #3 on: June 29, 2006, 08:23:07 PM »
Oh ok, i see what you mean.
Ok, so making the script is not a problem, if you only want it to have one icon on the systray. I'm unable to make the icon, though, i'm not much of an artist.
Another problem is that i can't make the F-lock detection, as i think that's made at the keyboard's level. It isn't found by ahk. (at least on my keyboard)

So, if you'd like me to make a script that would show an icon on the systray, depending on the state of caps lock, num lock or scroll lock, i can do it.

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 630
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #4 on: June 29, 2006, 10:23:05 PM »
I believe this is exactly what you were looking for in the original post.

http://home25.inet.tele.dk/bramsing/

I installed it and it seems to work fine.  It's a system tray indicator or Caps, Num and Scroll Lock keys.

Enjoy!
Insert Brilliant Sig line here

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #5 on: June 29, 2006, 11:02:22 PM »
Yes. Great. I can do the icon (just tell me what it needs to be, (32x32, 32bit, 16x16 256/you would need prob'ly nine icons for different states, right? Caps on num/scroll off, caps/scroll on num off, caps/num on scroll off, caps off num/scroll on,....)

I would love for you to make a script that would show an icon on the systray, depending on the state of caps lock, num lock or scroll lock   :Thmbsup:

I guess AHK can't tell when 'F Lock' has been pressed because it has similar properties as 'shift' in that it doesn't do anything unless you press something else (on my keyboard, if I press 'Insert' then 'F5'  my AHK Key History shows that I pressed 'Insert' then 'F5' - still kinda in a class all itself though 'cause 'Shift' shows up in key history)

Then, if I press 'F-Lock' and 'Insert' again (which would be 'PrtScn' because of 'F-lock' - 'Insert' is on the front and 'PrtScn' is on the top of the key) and 'F5' again, key history makes no mention of 'F-lock' but says 'Prnt Scrn' and 'not found' (because 'F5' is non-existant when 'F-lock'ed - there is no alternate function for F5 on this keyboard)

<edit> it'll be okay if it can't do 'F Lock'. If I can know the status of 75% of these buttons, that'll still be better than none - thanks.</edit>
-----------------
Rover, no: actually, the only program link mentioned in my first post was this program (the one you mentioned) and the first program link indicated in my second post was also this program (Systray Indicator)

I've tried that and, if you notice from my post just previous to this one (two up from yours, "reply #2" in this thread) something I especially don't want (3 icons)

thanks both of you so far for your input
-Dan
:)
« Last Edit: June 29, 2006, 11:05:46 PM by prosayist »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #6 on: June 30, 2006, 05:29:37 AM »
Ok... It's done! :D
Now, it only needs your icons. (Please post them here, so that i can add them to the script)
I think you can make them 32x32, 32bit, but i'm not sure, i'm not very informed about that.
Can you pack all the icons under one .ico file? If you do, i can change the script to accept that, and it'd be handier.

Right now, it takes 8 commandline parameters, with the following order:

Code: [Select]
;This is the order of the icons:
;1 - all off
;2 - Caps on Num off Scroll off
;3 - Caps off Num on Scroll off
;4 - Caps off Num off Scroll on
;5 - Caps on Num on Scroll off
;6 - Caps on Num off Scroll on
;7 - Caps off Num on Scroll on
;8 - all on

So, just download it, create a shortcut for it, open the shortcut's properties and under the "destiny" field, add the path to the 8 icons (can be relative path).

This isn't that intuitive, it's just so that you can test the icons to see how they look. When you give them to me, i'll change the script so that it'll come already predefined to use it's icons, and the user won't need to create the shortcut.

Here's the links!
.ahk version
.exe version

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #7 on: June 30, 2006, 09:26:26 AM »
thanks, jgpaiva  8)

attached here is a zip archive with 9 32x32/32 icons (very simplistic; 8 separate icons for each state and one icon with all of them)

I wasn't able to test the icons as per your instructions (as you said, "this isn't that intuitive") but I think it should work.. anything else please just tell me.

thanks,
-Dan

<edit>also attached is a zipfile with alternate icons. all still 32x32/32, still 8 separate and one combined but just a little different.</edit>
:)
« Last Edit: June 30, 2006, 09:40:41 AM by prosayist »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #8 on: June 30, 2006, 06:37:00 PM »
Ok, here it is!
I updated it, so that you only have to unpack the icons with the names "1.ico" to "8.ico" to the folder and run it.
Here are the links:
.exe Version
.ahk Version

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #9 on: June 30, 2006, 10:54:55 PM »
thank you so much, jgpaiva (may I just call you jgp?)  :Thmbsup:
:)

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
More KeyInfo icons
« Reply #10 on: July 02, 2006, 07:28:09 PM »
More icons for KeyInfo attached here:
= ltrgrn.zip (also the same as the 'KeyInfo.rar' also the same as my first attachment above)
= ltrsqr.zip (similar to but improved version of the 'alternate icons' in my post above')
= barredicons.zip (CAP,NUM,SCR highlighted with a red bar - barredicons have a white background, all others are transparent)
= ltrltsblkredicons.zip (black C-N-S with red lights)
= ltrltswhtredicons.zip (white C-N-S with red lights)
:)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,999
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #11 on: July 03, 2006, 12:30:50 AM »
cool!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #12 on: July 03, 2006, 06:23:16 AM »
Thanks prosayist!
I'll mention this thread on the codingsnacks post, so that people can come here to get new icon sets.
You really got the spirit of DC, prosayist, not only you made new icons, as you also posted pictures and descriptions of it!  :Thmbsup: :Thmbsup: :Thmbsup:
Thanks!

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #13 on: July 03, 2006, 10:13:17 PM »
Welcs, jgp.. happy to do it.

I really appreciate the concept of donationcoder and I'm glad to contribute in any way that I can.

If anyone has anything they'd rather see as an icon for this, mention it here and I'll do my best (i.e., "I want the same thing only in yellow instead of red."; "Can you make the letters go horizontally instead of vertically?"; "My current theme has #398EB5 and #F7F7F7 - I want to match that" etc.)

Also, any icons made by anybody else, please post them here just as I have  :)

I've always thought that I'd be more inclined to pay for software if the developer just suggested donations rather than:

"here's our software, it's $299.99"   ::)
     or
"try this program for 30 days and then, if you like it, pay me $59 else it will never work again"   :-\

<digression>I sometimes wonder how much less 'time-limited software' authors could charge if they didn't actually encode instructions to stop functioning after a given period of time.. actually, that was my first time wondering that - and it prob'ly doesn't take long to write
Code: [Select]
if(sinceinstall<=30days){stopworking;} .. but I don't write programs so I wouldn't know.  :-[ </digression>
:)

johi

  • Honorary Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #14 on: July 22, 2006, 07:27:17 AM »
why are the icons 32x32?
i can only display 16x16 :/ (well, they're automatically resized, but i don't understand it)

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #15 on: July 23, 2006, 05:45:04 PM »
"The size of system tray icon depends on the display apperance settings in
Windows (Caption Buttons size).
The default for Windows XP is 25 pixels, but it might be changed by user.
Windows Shell automatically resizes tray icons to fit into the system tray."
                                                                          (Victor Urnyshev, MSFT)

32x32 icons are clearer and easier to design than 16x16 icons.

You can make the icons in your system tray any size you want by entering the display applet in the control panel, appearance tab, and 'caption  buttons' selection in the "Item:" dropdown menu (a right click on the desktop also brings up the display applet)
:)

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
why this error?
« Reply #16 on: July 24, 2006, 01:31:56 AM »
Sometimes (seldom but occasionally, just often enough to be a nuisance) this error occurs:

___________________________________________
|Keyinfo.exe                                                               X|
___________________________________________|
|Error: Can't load icon. The current thread will exit.  |
|Specifically: 3.ico                                                       |
|                                                                                     |
|                          Line #                                                 |
|--->                   043: Menu, TRAY, Icon, 3.ico         |
|                                                                                     |
|                                    [OK]                                         |
|                                                                                     |

---------------------------------------------------------

I was gonna ask for someone to figure this out for me but now I'll just ask for verification of my correction.

Based on some advice I found (also in the help), I added "Menu, Tray, UseErrorLevel" after the 'ScriptVersion' and '#singleinstance' lines but before any others (line 3 excluding comments) and recompiled the 'Keyinfo.exe'.

So far it's worked as expected, prevented the previous error, but I'll hafta wait and see as it's only been a few hours since I implemented that fix.

Do any of you "Semi-Professional AHK Coders" recognize this as something that'll solve my problem?

--------------------------

In other news, jgp:
Could you make this to have tooltips?
I have been trying to get it to work but am having difficulty as I'm quite inexperienced with AHK

What I want is possible, I'm sure.. I just can't do it, you'll have to either do it or, better yet, if someone could tell me the correct format (menu, tip.. ? traytip?..
Code: [Select]
   If Scroll
      Menu,TRAY, Icon, 8.ico
with a separate section below with a similar loop
Code: [Select]
If Scroll
      TrayTip, KeyInfo by jgpaiva, Caps On`nNum On`nScroll On,11,
or all in one like
Code: [Select]
If Scroll
      Menu,TRAY, Icon, 8.ico
      TrayTip, KeyInfo by jgpaiva, Caps On`nNum On`nScroll On

ToolTip or "TrayTip" or "Menu, Tip" or "Tray, popup, balloon hint thingy"

No, I've tried all those and have realized that I need some assistance

(original ahk file, added "Menu, Tray, UseErrorLevel" on line 19)

I've tried several different methods that seemed logical to me but they all result in errors (ELSE with no matching IF, Target label does not exist, +/-)

When the mouse hovers the icon, display tooltip like below:


Quote
Caps On
Num On
Scroll Off
 (.. or something)

I'm unsure of the correct format and don't have enough awakeness left to figure it out but someone prob'ly can snack on this and either just do it and post the updated file or show me how at your discretion (either way I can learn)

thanks,
-Dan
:)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #17 on: July 24, 2006, 05:57:23 AM »
That bug is weird, Dan. I can't figure out where that comes from.

As for having tooltips, just do it like this:
Code: [Select]
If Scroll
      {
      Menu,TRAY, Icon, 8.ico
      ToolTip,Caps ON`,Num ON`,Scroll ON
      sleep,500
      Tooltip,
      }

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #18 on: July 24, 2006, 08:37:00 AM »
thanks; now how do I make the tooltip stop flashing?
         (only show up when over the tray icon)
Otherwise it's on all the time
         (right now it's on/off/on/off/on/off..Sometimes it stops flashing but then I hafta move my mouse)
:)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #19 on: July 24, 2006, 10:25:32 AM »
Sorry, i misunderstood you.
To have the tooltip working only on hover on the tray icon, use this:
Code: [Select]
If Scroll
      {
      Menu,TRAY, Icon, 8.ico
      menu,tray,tip,Caps ON`,Num ON`,Scroll ON
      }

prosayist

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Re: KeyInfo with ErrorLevel/ToolTips
« Reply #20 on: July 24, 2006, 11:06:15 AM »
Thanks jgp;
 I figured that out already and made a new version.
(Warning - while you were typing a new reply has been posted. You may wish to review your post.)

tooltip.png

Attached here, with UseErrorLevel and ToolTips, for those who wish to have it.
:)

Clive

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 107
    • View Profile
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #21 on: September 14, 2006, 02:40:52 AM »
Hello Everyone,
I find KeyInfo very helpful (being one of those clumsy hunt 'n' peck typists and having a cordless kb), but am mystified as to why KI disappears from the tray between shutting down the 'puter one day and turning it on the next. Any suggestions? Also (a wish) could it be made semi transparent and floating on the desktop?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: systray keyboard lights
« Reply #22 on: September 14, 2006, 05:10:20 AM »
Hello Everyone,
I find KeyInfo very helpful (being one of those clumsy hunt 'n' peck typists and having a cordless kb), but am mystified as to why KI disappears from the tray between shutting down the 'puter one day and turning it on the next. Any suggestions? Also (a wish) could it be made semi transparent and floating on the desktop?
You mean KI disappears every time you start the computer?
That's because it is a single executeable, without install, and doesn't have any config for starting with windows.
If you'd like it to start with windows, just drag and drop the executable on to the "startup" group on the start menu.