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: USB Keyboard hack question  (Read 1463 times)

0 Members and 1 Guest are viewing this topic.

Izrun

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 45
  • Last login:February 06, 2010, 10:32:20 am
    • izrun.com
USB Keyboard hack question
« on: June 23, 2006, 10:58:20 am »
I have a question about keyboard hacks (and I know that they are bad and a waste of time).  On Tiger-heli's keyboard hack page, it mentions that the USB keyboard driver will freak out if you press more than 6 keys simultaneously.  First off, is this still a problem with XP, or just a legacy issue (98, ME or 2k)?  Secondly, is this a six simultaneous key press limit per computer or per keyboard?  In other words, if I had two USB keyboards hooked up could I press 12 keys at a time without it freaking out? 

Thanks!
« Last Edit: June 23, 2006, 11:29:43 am by Izrun »
--Izrun

"There are 10 types of people in the world. Those that use binary and those that don't."

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:August 03, 2025, 02:34:22 am
  • Insufficient facts always invite danger.
Re: USB Keyboard hack question
« Reply #1 on: June 23, 2006, 12:09:38 pm »
I believe that is a limitation with USB.

But, with the cost of encoders being so cheap now, why bother hacking a keyboard?

Izrun

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 45
  • Last login:February 06, 2010, 10:32:20 am
    • izrun.com
Re: USB Keyboard hack question
« Reply #2 on: June 23, 2006, 01:25:46 pm »
But, with the cost of encoders being so cheap now, why bother hacking a keyboard?

Yeah, I know what you mean.  However, I was just tossing some ideas around in my head about ways to implement a hot swapable USB modular control panel that would not require any wires to ever be connected, so each modular unit would have it's own USB encoder.  At a couple bucks a pop this is reasonable, but 20 bucks is way to much (considering a joystick panel might only have 4 possible outputs going to it).  My next consideration is a bunch of gamepads, but then you run into more issues about assigning players (I think).  I probably will just implement my own HID device using a pic or something.  That way I could even make it more intelligent.

However, a USB limitation is still a little ambiguous.  Is that a USB per keyboard device limitation or system wide?  I suppose I might be able to test it with a USB hub and a bunch of unhacked keyboards.
--Izrun

"There are 10 types of people in the world. Those that use binary and those that don't."

Havok

  • Keeper of the __Blue_Stars___
  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4530
  • Last login:August 03, 2025, 02:34:22 am
  • Insufficient facts always invite danger.
Re: USB Keyboard hack question
« Reply #3 on: June 23, 2006, 02:08:45 pm »
Sorry - to be at least a little more specific: that's a USB keyboard HID limitation, 6 keypresses at a time. Granted, if you only have a 1 player setup, this is not really an issue. It comes more into play when you have two or more simultaneous players on a game that requires multiple buttons\joystick maneuvers like Street Fighter, etc...

Theorectically, if you did put two keyboards in there, I would think you could double your "limit" - definitely something to try.

How many panels are you planning? It sounds like you will have a similar setup as me. I have a GPWiz for each swappable panel, except for my "Tron" panel - which has a spinner\trackball\joystick (i.e. optical interface + USB joy instead).

You may want to optimize controls to reduce the number of panels, and the number of interfaces required.

Or, you could do a funky setup like this:

http://www.beersmith.com/mame/

Make sure to post a project announcement, and take lots of pictures!
« Last Edit: June 23, 2006, 02:12:16 pm by Havok »

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re: USB Keyboard hack question
« Reply #4 on: June 23, 2006, 06:45:02 pm »
Keyboard hacks are *NOT* bad, depending on the use.  For a 4P CP?  Forget it.  For a 1P CP with a joystick and two buttons?  Works a charm.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: USB Keyboard hack question
« Reply #5 on: June 23, 2006, 07:05:32 pm »
its not a keyboard hack good / bad question.. .but specifically USB

the trouble with the USB keyboard hacks is the USB keyboard spec specifically says 6 keys.  So most keyboards will implement it specifically for 6 keys.  You might get a few more depending on the keyboard... but since no ghosting is specifically more expensive, most don't.

There are other hotswappable control panel options.  I went with building my own tac switches that connect with standard barrier strips (something like these Radio Shack Link So the expensive parts where in the cabinet... but each control panel had a small 2 dollar barrier switch with easy wiring built in.

But after all that work, it wasn't all that bad plugging in the 2 db25 serial cables... and that was MUCH cheaper (buy M-M 25pin serial cables on ebay in bulk and cut them in 1/2 for the control panels.  Again a few bucks each)
« Last Edit: June 24, 2006, 09:42:05 am by Peale »

cmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:August 23, 2007, 02:27:26 pm
    • United SpongeBob
Re: USB Keyboard hack question
« Reply #6 on: June 23, 2006, 11:12:42 pm »
I think you were correct in assuming that the limit is per keyboard, and not system-wide.  However, I've never tried it myself.  Anyway, failing that, another plan would be using RJ45 (ethernet) plugs and jacks to make it modular and just having the encoder in the cabinet.  You could hook up 7 buttons per plug.

Peale, I'm using a PS/2 keyboard hack for a 4 player CP.  I'm fairly certain I have a matrix set up that will work with no ghosting, blocking, or key-limit problems.

Izrun

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 45
  • Last login:February 06, 2010, 10:32:20 am
    • izrun.com
Re: USB Keyboard hack question
« Reply #7 on: June 24, 2006, 12:43:21 am »
Yeah, I know plugging and unplugging things is not really a big deal.  However, once of my main goals is for my wife or any of my friends to be able (and willing) to swap out components with no knowledge of what to plug in where.  I'm planning on doing some sort of contact usb connection.  Again, I'm still in early planning and am just collecting some components (I figured I would put a message in project announcements once I get a little more focused).  On ebay today I scored a full Spy Hunter control panel for 20 bucks shipped (eBa y Link) and a pair of steel gunner 2 guns for 20 bucks (eBay Link 2), so I'm pretty excited. 

My other thought is to use a bunch of hacked gamepads.  I would then write an app that would detect which location each unit was plugged in and map them accordingly. 
« Last Edit: June 24, 2006, 09:43:08 am by Peale »
--Izrun

"There are 10 types of people in the world. Those that use binary and those that don't."

Izrun

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 45
  • Last login:February 06, 2010, 10:32:20 am
    • izrun.com
Re: USB Keyboard hack question
« Reply #8 on: June 24, 2006, 01:13:34 am »
Oh, I realized that you were talking about something similar to what I was talking about.   That is similar to what I was thinking.
--Izrun

"There are 10 types of people in the world. Those that use binary and those that don't."

hanelyp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:January 10, 2009, 11:08:19 pm
Re: USB Keyboard hack question
« Reply #9 on: June 25, 2006, 11:36:02 pm »
its not a keyboard hack good / bad question.. .but specifically USB

the trouble with the USB keyboard hacks is the USB keyboard spec specifically says 6 keys.
To be specific, the USB boot keyboard standard (which practically all USB keyboards follow) allows 6 general keys + any combination of shift, control, alt, and 'system' keys.  In the pannel I'm planning, control and shift are being used for 2 of the trigger buttons, pushing the limit to stick + 6 buttons.

Using all control, alt, and shift keys, I could get 12 closed switches at once, at the risk of some software not supporting all the buttons.  Also, the extra 6 would be a 1 keyboard thing.

The more general USB HID standard is far more flexable.  A game encoder intended to be read as a keyboard would have no difficulty with 64 switches.  It just wouldn't work as a 'boot' keyboard.