How can I use my keyboard to move the mouse ?


Forum: X and Fluxbox
Topic: How can I use my keyboard to move the mouse ?
started by: Ramik

Posted by Ramik on Nov. 07 2006,20:16
This Issue has been solved and has resulted in this guide:
< http://damnsmalllinux.org/cgi-bin....060;r=1 >


The Original Post:

How can I use my keyboard to move the mouse (enable MouseKeys???) ?

I'm running an old 100mhz pc with no mouse and no CDROM, I have managed to install DSL to my HD using this guide:
< http://www.jb4x4.com/linux/CompaqWriteup.htm >
I copied the CD content using FTP with FreeSco, then booted the image with isolinux,
Then I dsl-hdinstall to another partition.

The problem is that I want to control the X using the numpad keys, I found some info on:
< http://www.faqs.org/faqs/x-faq/part2/section-19.html >

Then I followed < http://www.jb4x4.com/linux/CompaqWriteup.htm > on how to install xfree86.
To run it I use -allowMouseOpenFail in .xserverrc so that the X is loading up, but I can't get the Xkb working and the "Option "MouseKeys".

* if its possible I'll prefer not using xfree86

** Its best that this option will be available when booting (in xsetup.sh I want it as an option to replace the mouse, cause I think i really messed up my system while installing DSL and I would like to clean format as soon as I figure out a permanent solution...) - but thats just an idea...

Posted by Ramik on Nov. 09 2006,18:43
I dug up some more details:

So the MouseKeys feature in Xkb is exacly what I need, but I don't know how to set it up, but Xkb does seem to be present in the Xfree86 MyDSL exteantion and their is a guide here   failed to follow ( :(  ):
< http://www.xfree86.org/current/XKB-Config.html >

Does anyone care to give it another try as I'm am clueless (o.o) ???

Posted by MDG on Nov. 10 2006,01:58
Ramik,
Try the ratpoison keyboard driven window manager - from MYDSL extensions.

< http://distro.ibiblio.org/pub....wm_apps >

MDG

Posted by Ramik on Nov. 10 2006,05:14
Thanks for the links, I too thought about ratpoison, but it seem to be incompatible with ICCCM which means many apps will need special compiles.
Beside, don't forget lazy programmers forget to set the Tabstop ;-) and thus programs become unusable with keyboard only.
If a mouse pointer is emulated, their is no such problem...

Though it is nice to know I won't be needing to compile ratpoison myself  :-)

Maybe their is a similar solution I no not of and might be more compatible ? I just know I won't like ratpoison...

Posted by MDG on Nov. 10 2006,13:26
Ramik,

Is this link what you are looking for?

< http://www.math.missouri.edu/~stephen/software/ >

MDG

Posted by mikshaw on Nov. 10 2006,14:21
The window manager you use has no influence over an application's keyboard use (other than deciding which events get passed on).  Some programs, such as Firefox, simply suck when it comes to keyboard control, and there's not much you can do about that other than the original idea of controlling the mouse cursor with keyboard.
Posted by Ramik on Nov. 10 2006,19:56
mikshaw: The WM doesn't SUPPOSE to have anything to do with such things, unfortunately, RatPoison's ICCCM non-compliance is originated partly from exactly that - messing with the keyboard...

MDG: Xkbset does seem right but I haven't tested it yet...

Is Xkbset present in DSL, is in need to be compiled, or download ?
I will need to setup a DevEnv for 2.4 kernel and will need some headers and stuff :-(, Maybe some kind soul care to try compiling the thing ?

Posted by Ramik on Nov. 10 2006,21:57
I haven't found Xkbset in XFree86.dsl nor in xf86config.dsl, and with no DevEnv I won't be compiling it...

Any chance anyone willing to compile this 64kb source ?
< http://www.math.missouri.edu/~stephe.....tar.gz >

I also am looking for some other solutions that are not code dependent (it should be a config that resides in XF86Config-4 +/- something), Any thoughts ?

Posted by Winter Knight on Nov. 10 2006,23:02
Alt-Shift-Numlock.

It is an X shortcut to enable mousekeys. I haven't tried in DSL. See if it works.

Posted by Ramik on Nov. 10 2006,23:30
Quote (Winter Knight @ Nov. 10 2006,18:02)
Alt-Shift-Numlock.

It is an X shortcut to enable mousekeys. I haven't tried in DSL. See if it works.

No, it doesn't, mousekeys is part of Xkb and must be enabled in XF86Config-4, the question is how ?

I tried following < http://www.xfree86.org/current/XKB-Config.html > with no success, maybe someone who uses xfree86 can try it out and might have better luck... :-(




Déjà Vu !!!:
< http://www.linuxforums.org/forum....es.html >

Posted by Winter Knight on Nov. 13 2006,03:17
You're right. It isn't that easy. I'm trying to get it to work so I can give you the instructions. Here is what I've done so far.

I compiled xbset for you. It doesn't work though. Under DSL's X, it says, paraphrased, "Wrong xkblib version or no xkblib version." Under XFree86 4.3 is says "XKB not supported for display 0:0". I also tried accessx, which was linked from that site, and mentioned elsewhere. I can't get it to compile. Neither of these programs specify what libraries or X versions they require.

I installed XFree86 4.3. I followed the instructions for that, replacing .xserverrc and adding XF86Config-4. I added the lines "+kb" and "+accessx" to the exec line in .xserverrc. I then tried the Alt-Shift-Numlock, then Ctrl-Shift-Numlock (I've seen it both ways on the internet. In debian stable, it's just Shift-Numlock). I don't know why that didn't work. It should have.

I think I can say that XF86Config-4 is not the way to go for solving this. I tried replacing the nvidia XF86Config-4 included in the XF86 mydsl extension with the one I regularly use on my debian system. Both XFree version are the same (or close). That didn't make it work.

I discovered that DSL uses something called TinyX. I also discovered that TinyX has a hundred different meanings. I can't figure out what version it uses. If someone else knows anything about this, feel free to say something.

Posted by Ramik on Nov. 13 2006,04:42
Thanks Winter Knight, I think xkblib is supposed to be a part of xf86 - compiled with it, but maybe xkblib was removed\replaced to lessen the size of the package.

So no xkblib explains why its hard to to get xkb going :-)

I think xkbset is a configuration utility that doesn't actually do anything but configure XF86Config-4 to use xkb.

Maybe we can try using a debian (.deb) package ?
I think DSL supports those but I can't be sure without a mouse - I never got around to figuring how to use aptitude and apt-get gives me the creeps :-)

Is their a debian\ubuntu user in the house ?

P.S: I think the TinyX you're referring to is :
< http://www.superant.com/smalllinux/tinyX01.html >
Its a cut down version of xf86 that is meant for the extreme low-end, if it is used by DSL as the default X (theirs a different between the Xserver and the WM) then it will explain the lack of xkb.

Posted by JB4x4 on Nov. 13 2006,04:52
I have compiled accessx from source and created two extensions - accessx.dsl and accessx.unc (The .unc needs DSL 3.0+)

Right-click and save either one

< http://www.jb4x4.com/linux/accessx.dsl >

< http://www.jb4x4.com/linux/accessx.unc >

These both worked using the XFree86.unc extension (I assume XFree86.dsl would work fine also).  Accessx wouldn't work with DSL's built-in xserver.  Make sure you copy the new xserverrc_for_XF86 file to /home/dsl/.xserverrc and the proper XF86Config-4 file to /etc/X11 (you will need to be "root" to do this). These can both be found in the XFree86_config_files directory that is created when you load the XFree86 extension.  Then restart X.

The command to start accessx to use mousekeys would be "ax +mousekeys".  More info on accessx can be found with the command "ax help"

JB

Posted by Ramik on Nov. 13 2006,04:57
Thanks JB4x4, I'll try and let you know if it worked...
Posted by Winter Knight on Nov. 13 2006,05:10
Excellent job, JB4x4. It works for me. Although, when you press "9", it goes up, instead of diagnal. All the other keys work just fine. Really wierd.

How did you get it to compile? What extensions or external development libraries did you have to install? I installed gcc1-with-libs.dsl, and XFree86-dev.dsl, and I got errors about some xkb stuff not being defined.

I'm a little disappointed that my work from the past several hours was wasted. On the plus side, the problem is solved. Although it would be nice to find out why "9" doesn't work.

Posted by JB4x4 on Nov. 13 2006,05:22
The 9 key did the same on my computer also.  I used gcc1-with-libs.unc and gnu-utils.unc and the accessx source from here < http://www.disability.uiuc.edu/accessx/freewareaccessx.html > .  I compiled it in DSL 3.0, by just running make (did not hack any of the files).  I didn't notice any errors - but with the 9 key not working correctly for both of us, I may go back and check.

JB

Posted by Winter Knight on Nov. 13 2006,05:58
I used gcc1-with-libs.dsl and gnu-utils.dsl with that source. It still doesn't compile for me. A whole bunch of Xkb* undeclared errors.

The "9" thing doesn't really smell like a compile time issue. I would assume that the --make-all-keys-work configure option is included by default.

Posted by Ramik on Nov. 13 2006,06:37
OK, something doesn't work for me, this is what I did step by step:
0. Ctrl+Alt+Backspace to break server.
1. sudo mydsl-load /home/dsl/XFree86.dsl
2. sudo mydsl-load /home/dsl/xf86config.dsl
3. sudo mydsl-load /home/dsl/accessx.dsl
4. copyed /home/dsl/XFree86_config_files/XF86Config-4_vesa to /etc/X11/XF86Config-4
5. copyed /home/dsl/XFree86_config_files/.xserverrc_for_XF86 to /home/dsl/.xserverrc
5. ax +mousekeys
6. startx

Ctrl+Shift+NumLock \ Alt+Shift+NumLock \ Left\Right all failing...

What am I doing wrong ?

I'm so sad :-(

Posted by JB4x4 on Nov. 13 2006,11:12
Winter Knight - The only errors I received where about some depreciated headers - I am using .unc files and DSL 3.0 if that makes any difference

Ramik - It appears that accessx needs to be started after an X server is running.  To do this, add the line "xterm -e ax +mousekeys" (no quotes, in a new line) after "torsmo 2>/dev/null &" in the /home/dsl/.xinitrc file.  You can use "nano" or "vi" to edit files from the command line.  This should run accessx when you run startx.  It was working on my system anyways.

JB

Posted by Ramik on Nov. 13 2006,11:38
OK, let me just re-install DSL (should take about 20min on my 100mhz 32mb :-)  ) and I get back to you on how it went...

*I uninstalled to test out the new debian GNU\Hurd, it didn't even boot :D I guess nothing had changed since the last time I tryed to do that ( was it 2 years ago ?! ).

One day I'll play Duke Nukem Forever on GNU\Hurd !

Posted by Ramik on Nov. 13 2006,12:28
Its Working !!!

I added "xterm -e ax +mousekeys" in .xintrc as you said and it works !

I think I will make a little How-To on installing DSL and setting up the X with no mouse...

Thank you Winter Knight and Huge Thanks to JB4x4 !!!

Here is the How-To:
< http://damnsmalllinux.org/cgi-bin....060;r=1 >

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.