INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Taking over numeric keypad  (Read 2264 times)

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Taking over numeric keypad
« on: December 06, 2009, 06:11:11 pm »

Is there a special driver that I could use to take over a simple numeric keypad (or full keyboard for that matter) which would let me translate key presses into more advanced functions: launch a program, etc.?  The standard keyboard driver gets used automatically but it seems that I could manually change the driver to a custom driver.

The reason I want to do this is because I have a KVM and use my PC for MC while using my Mac for other activities.  I'd like to use one of the several numeric keypads I have lying around to attach directly to the PC and map keys to control MC.

1 -> Ctrl + P
2 -> Ctrl + N

etc.  This would be quite useful.  Otherwise, a more advanced but more integrated system would be capturing the media keys on my Mac (they do nothing right now) and sending those to MC over the network.

Thanks.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 787
Re: Taking over numeric keypad
« Reply #1 on: December 06, 2009, 08:03:51 pm »

try autohotkey

I have a long-term experiment running with a Ergodex DX1 and in the past have played with things like the Logitech G13 and Belkin N53.

The Ergodex DX1 is a little pricey at $150- list but the Logitech and Belkin controllers can be had for under $75-

You could also try to program a Logitech Harmony or any of the Philips Pronto devices.
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Taking over numeric keypad
« Reply #2 on: December 07, 2009, 12:43:18 pm »

Does autohotkey allow a hardware input device to be taken over?  If I map number 1 to Play/Pause MC, I don't want it to work from my regular keyboard.  I just want it to activate from a specific numeric USB keypad.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 787
Re: Taking over numeric keypad
« Reply #3 on: December 07, 2009, 04:56:15 pm »

every button on a keyboard has it's own scan code.

try it.
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Taking over numeric keypad
« Reply #4 on: December 07, 2009, 10:19:38 pm »

Every button on every keyboard has a unique scan code?  I'll try it.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 787
Re: Taking over numeric keypad
« Reply #5 on: December 07, 2009, 10:34:42 pm »

other than cosmetics, keyboards are very much standardized.

Keyboard 'drivers' are usually customization routines.  Most/all keyboards would work fine without mfgr-specific driver software.
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Taking over numeric keypad
« Reply #6 on: December 09, 2009, 02:04:08 am »

The point I'm trying to communicate is that a standard keyboard driver links keypresses to system keypress events.  With a custom driver installed, keypresses would be routed through the custom driver.  At that point, the custom driver could simply ignore them OR send them to a special piece of software.  In other words, pushing a button on this specially set up keyboard would NOT send that key to the system at all.  The custom driver would get the signal and use it without relaying it to the system processes.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 787
Re: Taking over numeric keypad
« Reply #7 on: December 09, 2009, 02:38:51 am »

separate the keyboard hardware from the native OS keyboard drivers and add-on HID device drivers.

Even with fancy software, most/all pc keyboards send the same scan codes for the same button presses.  The OS will always see the same scan codes no matter what software is loaded.

How the OS reacts to those presses is the function of software.

This is why add-on keyboard software can do what it does.  Even something simple like a registry entry like this:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,3a,00,00,00,00,00

will work on just about every windows machine from XP on because the keyboard hardware is so standardized and so is the native OS keyboard drivers.
Logged

benn600

  • Citizen of the Universe
  • *****
  • Posts: 3849
  • Living: Santa Monica CA Hometown: Cedar Rapids IA
Re: Taking over numeric keypad
« Reply #8 on: December 09, 2009, 09:52:40 am »

So at the hardware level something is capturing the button presses and sending them to the system (BIOS startup, etc.)?  Clearly someone could make a keyboard with its own driver that would not be captured by the system and then the custom driver could activate actions based on button push.  Just like gaming controllers have buttons that don't merely push a letter--they send a custom signal to a custom driver, or just the generic game controller driver.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 787
Re: Taking over numeric keypad
« Reply #9 on: December 09, 2009, 10:23:56 am »

exactly.
Logged
Pages: [1]   Go Up