Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mouse: keyboard/joystick emulation  (Read 3028 times)

0 Members and 1 Guest are viewing this topic.

numlock

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:December 12, 2003, 07:14:33 pm
  • I'm a llama!
Mouse: keyboard/joystick emulation
« on: November 19, 2003, 02:52:29 pm »
Hello,

I noticed a post which enabled a joystick to emulate the keyboard.

Please, does anyone know if it would be possible, and if so how (i.e. a driver, program running in background, etc.), to enable mouse movements (i.e. left, right, up and down) to emulate the keyboard (left, right, up and down arrow keys) or a joystick (left, right, up and down axis movements)?  It doesn't seem like it would be too difficult (especially since the joystick can emulate the keyboard - see aforementioned post).

I have been looking for this capability for a long time but have not found it.  I would really like to control software games with the mouse instead of the keyboard or joystick (as you know not all games provide joystick support and trying to control a game with the keyboard is not very practical, especially for flying or racing type simulation games.

Any ideas would be greatly appreciated.  Thank you.

DPC

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re:Mouse: keyboard/joystick emulation
« Reply #1 on: November 19, 2003, 08:03:20 pm »
Well you have to think about the differences here.... with a PC game like a 1st person shooter for example when you press a keyboard button and hold it down you move might move forward.  When you let go you stop moving forward.  How would this work with a mouse?  You move the mouse forward a bit and your guy starts moving forward?  How do you stop?  Move the mouse backward?  If thats how you stop then how do you use your mouse to tell the computer you want to move backward?  Or do you rather sit there and continually move the mouse forward until your mouse falls off the table?  I dont see how the keyboard is less practical than a mouse in this situation.

I'd start looking at mouse gesture programs if you really want to do this.

Tilzs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 332
  • Last login:February 16, 2011, 10:41:56 am
  • Neat
    • Cocktail Arcade
Re:Mouse: keyboard/joystick emulation
« Reply #2 on: November 19, 2003, 08:38:04 pm »
I don't know if you'll find a program like that. The way a mouse works is different than the way a keyboard or joysticks work. Like Jakobud said there is problems with useing the mouse like that and I think that even if you did have a mouse control useing it on games wouldn't be much easier than just useing the keyboard. BTW if it's "not too difficult", perhaps you could program it.

numlock

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:December 12, 2003, 07:14:33 pm
  • I'm a llama!
Re:Mouse: keyboard/joystick emulation
« Reply #3 on: November 20, 2003, 02:05:33 pm »
Thank you for your responses Jakobud and Tilzs.  You made some good points.  If I may comment on them:

Jakobud said:

Quote
Well you have to think about the differences here.... with a PC game like a 1st person shooter for example when you press a keyboard button and hold it down you move might move forward.  When you let go you stop moving forward.  How would this work with a mouse?  You move the mouse forward a bit and your guy starts moving forward?  How do you stop?  Move the mouse backward?  If thats how you stop then how do you use your mouse to tell the computer you want to move backward?  Or do you rather sit there and continually move the mouse forward until your mouse falls off the table?  I dont see how the keyboard is less practical than a mouse in this situation.

and Tilzs said:

Quote
I don't know if you'll find a program like that. The way a mouse works is different than the way a keyboard or joysticks work. Like Jakobud said there is problems with useing the mouse like that and I think that even if you did have a mouse control useing it on games wouldn't be much easier than just useing the keyboard.

Yes, obviously, there are differencs and I am indeed having difficulty finding a program to do this.  Regarding implementation, one would clearly need to give the design a little thought.  However, it would seem to be very doable.  One viable solution, off the top of my head, in porting keyboard arrow key's and/or joystick controls to the mouse's corresponding controls could be to allow the mouse's directional movements to conditionally initiate a corresponding move in the corresponding direction.  Conditionally essentially meaning incorporating a sensitivity (i.e. as seen in some games' mouse contoller settings; see Motocross Madness game for example) and/or "dead zone" (i.e. as with a joystick; see most any flying or racing sim game for example) setting into the design.  In other words, allow a move only after a user-defined: mouse movement rate of speed has transpired or mouse distance has been travelled.  This is only one solution which I believe would allow the user to control a game much more instictively and effectively.

Jakobud also said:

Quote
I'd start looking at mouse gesture programs if you really want to do this.

Actually, I have but with no luck.  Various problems I have encountered: no support for joysticks or the keyboard arrow keys; user must perform some action indicating a gesture is being made (i.e. hold right mouse button down); etc.

Tilzs also said:

Quote
BTW if it's "not too difficult", perhaps you could program it.

Actually, I wasn't speaking of me specifically, however, I still believe this emulation would be very doable; And, I would implement it if I was more familiar with this low a level of Windows programming and had the time.  In any event, I was hoping this functionality (which I believe is quite ergonomic and much more instictive in nature, from a human-machine interaction perspective, than a keyboard or, in many situations, a joystick) might have already been developed, whether via a driver or stand-alone app or however.

I hope there are others out there who feel similarly about the mouse as a game controller.  All discussions and assistance are welcome.  Thanks.

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Mouse: keyboard/joystick emulation
« Reply #4 on: November 20, 2003, 10:20:13 pm »
This will do it...but it doesn't support NT/XP...

http://members.tripod.com/~szanella/joyemueng.htm
All Your Base Are Belong To Us!

numlock

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:December 12, 2003, 07:14:33 pm
  • I'm a llama!
Re:Mouse: keyboard/joystick emulation
« Reply #5 on: December 10, 2003, 05:36:26 pm »
Thank you so much Spaced Invader.  Sorry for the delayed response; I have had problems with the forum allowing my replies.

This software, JoyEmu, looks like what I need; however, I haven't had any luck getting it to work in any of the games I have tried.  I even loaded it via autoexec.bat as suggested by the author; however, after it loads, my system reboots automatically, then continues the cycle until I intervene.

PLEASE, has anyone had any experience and luck using this keyboard emulator, JoyEmu; I really need to get it or something similar working.  Thanks for any help.

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Mouse: keyboard/joystick emulation
« Reply #6 on: December 10, 2003, 06:36:50 pm »
Gotta know your specs...especially what OS you're using. Also your mouse is it USB or PS/2? ETC... Basically tell us everything you feel is important, then tell us everything you don't feel is important.

I'll try, but no promises...I use 2000 and XP...they don't play well with this software.  ;)
« Last Edit: December 10, 2003, 06:41:27 pm by Spaced Invader »
All Your Base Are Belong To Us!

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:Mouse: keyboard/joystick emulation
« Reply #7 on: December 11, 2003, 12:50:53 am »
what PC games are these that you're trying to play?  Even the old first Wolfenstein 3D had mouse support.  So did the King's Quests and the ones like it, at least the ones that didn't require you to type.  

It's a question of what mechanics would be involved, and whether it would be possible to produce the necessary keyboard commands with a mouse.  Would you be pressing up, down, left, right by moving the mouse in those directions?  If so, would "up" stay pressed while the mouse was moving that direction, then release?  In that case, how would you keep a sustained "up" pressed...  you'd have to release it all the time when you had to pick the mouse up and put it back at the middle of the pad.  

But, you could also have "up" be pressed when the mouse moved up a bit, then release it when it moved down...  but then how would you press up without then pressing down when you tried to "release up"?  

Then, you could also have the mouse hold down the keyboard key it'd been moved in the direction of, keeping track of a "center position" and the mouse's position relative to it...  but if you did that, you'd lose track of the center position and never find it again.  (I know all about it, I once tried playing Nintendo with the Power Glove.  It's the exact same story as what you're trying to do.)  Plus, you'd probably have issues related to the "mouse acceleration" feature in windows.  If you moved the mouse quickly to the left and then slowly back to the center, you'd still be to the left of center - the center would keep moving around on the mouse pad.  Same if the mouse ever skipped a beat, which they do, even if you turned mouse acceleration off.

Or, you could have the gesture system mentioned, where you move the mouse in a pattern and it sends a keystroke.  This seems like the only method that would actually work for sending the key you want to send reliably, but it would be so darn slooow!  You'd have to trace out a unique symbol on the mouse pad, just to push a single keyboard key.  Add to that the fact that it's difficult for the PC to recognize gestures easily - look at the game Arx Fatalis, it's always reading your hand gestures wrong and doing the wrong spell rune.  You'd never be able to play your game right.

There is one alternative left, and it was used to add mouse support to old Dos programs that used text-mode to provide an interface.  For every certain number of mouse-ticks the mouse moves in a direction, it could send a single keypress command, i.e. press "left" once for every quarter inch you moved the mouse left, or something.  That would work only with games that use the same type of commands to move the character, i.e. press left once and your guy moves one square to the left.  I'm having trouble thinking of any games that worked like this.  Almost all of the games I played had either had you press left to start moving and left again to stop, or had you hold down left to keep moving left and release it to stop.

So anyway, think about whether or not this is even possible before you spend a lot more time looking.  What you should really do is use a joystick to do this, because it has an inherent natural center position that it returns to automatically, so it can use method number three without losing track of the center position, and works great.
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net

numlock

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:December 12, 2003, 07:14:33 pm
  • I'm a llama!
Re:Mouse: keyboard/joystick emulation
« Reply #8 on: December 11, 2003, 12:57:44 am »
My specs are as follows:

OS: Windows 98
Memory: 256MB
Keyboard: Standard 101-Key "Enhanced" PS/2 Keyboard
Mouse: PS/2
Joystick: Not connected; only want keyboard emulation via mouse

I have tried JoyEmu with Nicktoons Racing and with some Atari 2600 games (software entitled: Atari - 80 Classics Games In One), namely Football and Homerun.  As I said earlier, I have tried loading JoyEmu from a command prompt, after OS has loaded, and then running the game.  Also, I have tried loading JoyEmu via autoexec.bat as the author suggests.

One note however: after successfully loading JoyEmu via command prompt, after OS has loaded, I noticed the mouse did emulate the keyboard right arrow key when dragged across the window.

Please let me know of any other information that might be relevant.  Again, I do appreciate your and anyone else's help with this.

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Mouse: keyboard/joystick emulation
« Reply #9 on: December 11, 2003, 11:31:28 am »
Did you run this (JCMPTST.EXE ) program? Its included in the zip and tests for compatibility with your system (some bioses aren't compatible). What did it do?

Are you using (JOYCP.EXE) to " to turn on/off mouse keyboard emulation and to set tolerance for each mouse axis"?

Do you have a Real Mode (DOS) mouse driver loaded?

What parameters did you use when you put it in your autoexec.bat? What else was in that bat? What order?

Are the programs you are trying to run with it native Windows apps or DOS?

All Your Base Are Belong To Us!

numlock

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:December 12, 2003, 07:14:33 pm
  • I'm a llama!
Re:Mouse: keyboard/joystick emulation
« Reply #10 on: December 12, 2003, 07:28:26 pm »
Quote
Did you run this (JCMPTST.EXE ) program? Its included in the zip and tests for compatibility with your system (some bioses aren't compatible). What did it do?

Yes, I did run it and it showed my system was compatible with the emulator software.

Quote
Are you using (JOYCP.EXE) to " to turn on/off mouse keyboard emulation and to set tolerance for each mouse axis"?

Yes.

Quote
Do you have a Real Mode (DOS) mouse driver loaded?

I'm not sure.

Quote
What parameters did you use when you put it in your autoexec.bat? What else was in that bat? What order?

I didn't use any parameters; I set everything up with JOYCP.EXE.  The only other item in autoexec.bat was a statement setting an environment variable: SET BLASTER=<settings>.  I placed JOYEM.EXE on the first line followed by the environment variable setting.

Quote
Are the programs you are trying to run with it native Windows apps or DOS?

They are native Windows apps.

Some other notes:

After the emulator software loads from autoexec.bat, it says it was installed; then the systems hangs a few seconds; then reboots.

When the emulator software is loaded from a command prompt after Windows has loaded, it says it was installed but the task manager does not show it running.

However, when I load the emulator software using the start command (i.e. "start joyem.exe"), it is launched in a new window and says it was installed; then when I check the task manager, it shows to be running.

Hope this helps.

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Mouse: keyboard/joystick emulation
« Reply #11 on: December 14, 2003, 08:46:14 pm »
Try loading a real mode mouse driver before you load the emulator.

Here is one (use the sys/bus version (c:\mouse\mouse.sys goes in config.sys--assuming c:\mouse is your path))...

http://www.drivermuseum.com/pub/drivers/mouse/elka/elka.zip

And if that one doesn't work try (make sure its loaded before the emulator!)...

http://cutemouse.sourceforge.net/program/ctmous19.zip

Let me know...
« Last Edit: December 14, 2003, 08:47:11 pm by Spaced Invader »
All Your Base Are Belong To Us!