The time now is Fri 20 Apr 2018, 14:35
All times are UTC - 4 |
Author |
Message |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Fri 23 Oct 2009, 12:03 Post subject:
Numlock switcher for X |
|
Dear Puppians,
I had a weird experience today installing Puppy Jaunty on a Packard-Bell EasyNote laptop. A friend was willing to let me trash his pre-installed Vista for Puppy, an opportunity for which I am grateful, coming as it did on the launch day of M$ Win7. He would be an influential Puppy convert/advocate since he is a rector of a university in Germany. Everything went fine except for the Xorg language settings. I have four languages on my three computers and did the same for him. Oddly, whenever I tried typing anything in the three additional languages, I would get crap on the right side of the keyboard, starting with the letter "k". I could not for the life of me figure out what was wrong. Eventually, to our mutual embarrassment, I figured it out: numlock was on by default and there was no indicator lamp to tell us. I looked in the bios for a way to turn it off by default, but the Packard-Bell implementation is a very abbreviated affair with no numlock setting that I could see.
So, I compiled a little program called numlockx, which can toggle the state of that key. It can be placed in root/.xinitrc or in the /root/Startup dir. It knows only two arguments:
Code: |
numlockx on
numlockx off
|
Now, everything is all sweetness and light in EasyNote-land. Long live Puppy!
Here is the tiny binary (4k), which I tested in 3.x and 4.x.
With kind regards,
vovchik
Description |
|

Download |
Filename |
fixnumlock.tar.gz |
Filesize |
3.17 KB |
Downloaded |
596 Time(s) |
|
Back to top
|
|
 |
jemimah

Joined: 26 Aug 2009 Posts: 4309 Location: Tampa, FL
|
Posted: Fri 23 Oct 2009, 17:50 Post subject:
|
|
There's also a more generalized version of this called xte that can be used to press any button you want from a script.
http://linux.die.net/man/1/xte
You can get it here: http://hoopajoo.net/projects/xautomation.html
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Sat 24 Oct 2009, 19:25 Post subject:
|
|
Hello vovchik
Very nice little app. I put the binary in my path (/usr/bin if I recall) and made a simple script and put it in /root/Startup such that my numlock is on at boot and X restart. Code: | #!/bin/sh
numlockx on & |
Thank you and Cheers
Mick
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
Vyse

Joined: 15 Aug 2009 Posts: 30
|
Posted: Sun 25 Oct 2009, 07:23 Post subject:
|
|
@vovchik
Thanks a lot!! This is exactly what I was looking for..no more turning the numlock manually after each start!
Long live Puppy!
|
Back to top
|
|
 |
Fingers

Joined: 25 May 2013 Posts: 16 Location: London, UK
|
Posted: Wed 19 Jun 2013, 09:45 Post subject:
|
|
fatdog64 users: search for numlockx in the Package Manager (in Control Panel > System) and install it there. Option to have numlock on at startup is provided
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|