Keyboardstate - A keyboard country flag tray icon

Miscellaneous tools
Post Reply
Message
Author
User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

Keyboardstate - A keyboard country flag tray icon

#1 Post by tasmod »

I've noticed in other os's that there is often a mini flag in the system tray, or whatever, denoting the keyboard country flag.

So I decided to modify the firewallstate tray icon code to produce a flag icon in the tray just the same.

The right click brings up a much smaller menu with just the info as necessary.

Hover tooltip states the keyboard country.

Please test and report.

Thanks
Attachments
keyboardstate-1.0.pet
(31.53 KiB) Downloaded 478 times
trayflagicon.jpg
(4.8 KiB) Downloaded 823 times
Last edited by tasmod on Mon 26 Sep 2011, 09:30, edited 1 time in total.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#2 Post by DPUP5520 »

Works just fine, very nice.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#3 Post by vovchik »

Dear tasmod,

Thanks for the little utility. I am running 4 keyboard layouts (US, RU, DE and UA) and when I change by performing an alt-shift combination, the flag in keyboardstate does not change to indicate the current layout (unlike fbxkb). Is there any way you could add that feature? Also, clicking on the flag in fbxkb cycles through the layouts specified in xorg.conf, which is also convenient.

With kind regards,
vovchik

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#4 Post by tasmod »

Hmm, odd it should change state. Does it change if you restart JWM?

It may be I need to change the 'return' to not correct. That way it will re-look.

It works by checking 'keymap'
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#5 Post by vovchik »

Dear Rob,

I am using IceWM.:(, but that sould not really make a difference, I think. keyboardstate shows up in the system tray area just fine and the left-click menu works...

With kind regards,
vovchik

PS. These are the relevant lines from xorg.conf:

Code: Select all

Option "XkbLayout" "us,ua,ru,de" 
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#6 Post by tasmod »

Hmm, interesting stuff that fbxkb.

Vovchik,

I had in mind that this was a first run item when Puppy is first installed, to be removed once keyboard is set.
I considered that the First Run wizard would remove the file during keyboard setting etc.

However, I looked up X11/XKBlib.h used in fbxkb and believe that it is a way to get the device info returned for the X keyboard swap.

No promises but I'll experiment for a while.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

Post Reply