Log in

View Full Version : Question for all you software programmers....



tooboxinit
05-30-2008, 10:07 AM
Is it possible to create a program that will allow me to use a second keyboard on one machine and the software emulates the keyboard as if it was a keypad like XKEYS or something. If so then we as multiboxers could have a second keyboard right above our normal keyboard and the second keyboard would provide us with alot more keys for the price of 5-10 dollars(usb keyboards are cheap, ps2 even cheaper) and we wouldnt have to spend hundreds of dollars on added hardware like Xkeys, G15s and N52s that provide much less keys. Obviosly i can just plug a second keyboard in now. but it will just do the same things my regular keyboard does. Let me know what you think guys.

Ken
05-30-2008, 10:12 AM
The game only accepts that much different button inputs as the keyboard provides(and even less). The keys that you can use are also limitted.
So: no, won't work, sorry :)

[edit] Or do you mean that a regular key like like '1' on the second keyboard would map onto 'shift+1' on the first keyboard?

Drizzit
05-30-2008, 10:14 AM
How about have the second keyboard be program with hot key like xkeys does. Example keyboard 2 the x key can be alt + shift + 1

pipakin
05-30-2008, 10:17 AM
It would be technically possible, but insanely hard. The time it would take a programmer to code it and clean it up, you're better off just buying an xkeys :)

Drizzit
05-30-2008, 10:24 AM
true, but the xkeys pro usb has been unavailable for a month now :(

Freddie
05-30-2008, 10:36 AM
I'm pretty sure it's possible using Windows's Raw Input API ('http://msdn.microsoft.com/en-us/library/ms645543(VS.85).aspx'). From what I've read about that API it wouldn't be particularly difficult for somebody who writes Win32 applications professionally. However I've never used that API so I can't say for 100% certain.

By the way, if you have a second PC on your desk, a program like HotkeyNet will let you use both keyboards to control either computer. That would accomplish the same thing as what you're describing. The only difference is there would be a millisecond or two of latency. [Edit: less than a millisecond, probably.]


The game only accepts that much different button inputs as the keyboard provides(and even less). The keys that you can use are also limitted.
So: no, won't work, sorry :)
Most games accept hundreds of key combinations of alt, shift, ctrl, main keys, etc. The advantage of a second keyboard is that it could be configured so a single key press on that keyboard generates a different combination from the same key press on the first keyboard.

Ken
05-30-2008, 10:43 AM
The game only accepts that much different button inputs as the keyboard provides(and even less). The keys that you can use are also limitted.
So: no, won't work, sorry :)
Most games accept hundreds of key combinations of alt, shift, ctrl, main keys, etc. The advantage of a second keyboard is that it could be configured so a single key press on that keyboard generates a different combination from the same key press on the first keyboard.
I agree, but what is quicker:
- moving your little finger to shift or another modifier (alt with thumb of course)
- moving your whole hand to another keyboard

;)

[edit] What I do is optimize my keyboard layout:
http://farm3.static.flickr.com/2138/2511460900_29f9357d6d.jpg
Blue: Movement
Green: Main bar (with modifiers)
yellow: totems (with modifiers: each button is a totem group like fire, modifiers put a different fire totems)
red: healing (with modifiers)
purple: buffs
0: mount
+/-: focus set/unset (with modifiers)

Using ESDF instead of WASD gives you a lot of extra usable keys.
All the things that I don't frequently use are on my keypad, because I have to move my (right) hand to control it (and you want to avoid delays as much as possible).

Tehtsuo
05-30-2008, 10:48 AM
The game only accepts that much different button inputs as the keyboard provides(and even less). The keys that you can use are also limitted.
So: no, won't work, sorry :)
Most games accept hundreds of key combinations of alt, shift, ctrl, main keys, etc. The advantage of a second keyboard is that it could be configured so a single key press on that keyboard generates a different combination from the same key press on the first keyboard.
I agree, but what is quicker:
- moving your little finger to shift or another modifier (alt with thumb of course)
- moving your whole hand to another keyboard

;)I believe what's being discussed is a third option

- leaving your whole hand on another keyboard, much like people who have an xkeys do

I had intended to write an application that does exactly this, but am testing a new app that may have beat me to the punch. I'll update the community if it works.

Drizzit
05-30-2008, 10:49 AM
moving your whole hand to another keyboard
Well it depends what your other hand is doing... :P

Anyways, it depends where the other keyboard is. I was thinking of having the other keyboard in an up position so it looks like this
_
| |
| |
| |
| |
|_| __________
|_________|

Yea, it looks better in my mind lol (Think of battleship set up). I hope you get what i am trying to say. So when you need to hit that other key your not totally moving you hands.

Maz
05-30-2008, 10:50 AM
Off the top of my head (and I'm really not in my field here), I'd think you'd need a second keyboard driver that generated different virtual-key codes for the second keyboard.

I may of course just be making myself look stupid :D

Actually, the keys that WoW will respond to are limited to this subset ('http://www.dual-boxing.com/wiki/index.php/Available_Keys_in_World_of_Warcraft') so having a second keyboard isn't going to get you much.

Ken
05-30-2008, 10:50 AM
I believe what's being discussed is a third option

- leaving your whole hand on another keyboard, much like people who have an xkeys do

Anyways, this idea is a possiblity, and I have been working for several months on making it a reality. It's taking quite a bit of effort on my part, as I consider my coding knowledge to be midrange, but I hope it will pay off. I will give no further details, as I don't intend to give away my idea so someone else can capitalize on it.
How do you control the camera if you have both hands on a keyboard?
Rotating it with keys is really not an option, because it's either too slow or too inaccurate to play.

Tehtsuo
05-30-2008, 11:42 AM
I think this is what we're looking for. Keyboard Commander has a free trial that allows 5 commands, and full version is 24$ according to the site. It allows for different command programming for multiple keyboards. This is a great idea for people who like to tinker, I've got an old IBM keyboard and have already pulled off all the keys. I plan to glue custom buttons onto the tops of specific keys and leave the rest of the keys absent.

Freddie
05-30-2008, 11:50 AM
I agree, but what is quicker:
- moving your little finger to shift or another modifier (alt with thumb of course)
- moving your whole hand to another keyboard
Like Drizzit said, it depends. I agree with you that it's not good to move your hand frequently but there are lots of ways to use multiple keyboards that don't involve that. For example, infrequently-performed actions that are bound to cumbersome key combo's can be assigned to single keys on a separate keyboard. Or the two keyboards can be used in different situations.


Off the top of my head (and I'm really not in my field here), I'd think you'd need a second keyboard driver that generated different virtual-key codes for the second keyboard.
For whatever it's worth, this is my field, or one of them anyway -- I've been doing keyboard programming since at least 1987 when I applied for a patent for a type of keyboard driver -- and I don't think you need a driver or a second set of virtual key codes. If you check out the link I posted above to Windows's Raw Input API, I think you'll agree with me that Windows keeps track of which keyboard generated a particular keystroke, and applications can obtain that info from Windows at the API level.


Actually, the keys that WoW will respond to are limited to this subset so having a second keyboard isn't going to get you much.
That's a great table. But you and I are interpreting it very differently. I look at it and see 616 different key combinations. That's 616 "signals" that the game can respond to. It would take more than six keyboards to assign all those signals to single keys.

Edit: added Maz's name to quotes

Drizzit
05-30-2008, 11:52 AM
That's a great table. But you and I are interpreting it very differently. I look at it and see 616 different key combinations. That's 616 "signals" that the game can respond to. It would take more than six keyboards to assign all those signals to single keys.
I like to see someone try that. How many keyboards would that be?

pipakin
05-30-2008, 11:59 AM
I'm pretty sure it's possible using Windows's Raw Input API ('http://msdn.microsoft.com/en-us/library/ms645543(VS.85).aspx'). From what I've read about that API it wouldn't be particularly difficult for somebody who writes Win32 applications professionally. However I've never used that API so I can't say for 100% certain.

By the way, if you have a second PC on your desk, a program like HotkeyNet will let you use both keyboards to control either computer. That would accomplish the same thing as what you're describing. The only difference is there would be a millisecond or two of latency. [Edit: less than a millisecond, probably.]


The game only accepts that much different button inputs as the keyboard provides(and even less). The keys that you can use are also limitted.
So: no, won't work, sorry :)
Most games accept hundreds of key combinations of alt, shift, ctrl, main keys, etc. The advantage of a second keyboard is that it could be configured so a single key press on that keyboard generates a different combination from the same key press on the first keyboard.

Hrm, I'll have to brush up on my Win32 API then clearly. I've been buried in .Net coding too much lately :). Thankfully, I've just gotten a new jopb and should be moving towards more interesting coding then "design a web page to acess this database table"...bleh.

Drizzit
05-30-2008, 12:02 PM
I miss my coding days ;( . Wasn't one of the best coders, but i knew a great deal. My new job just have me doing database stuff, I love it, but you don't make anything really look cool.

Freddie
05-30-2008, 12:12 PM
Hrm, I'll have to brush up on my Win32 API then clearly. I've been buried in .Net coding too much lately :). Thankfully, I've just gotten a new jopb and should be moving towards more interesting coding then "design a web page to acess this database table"...bleh.
Grats on the new job. :) Maybe Raw Input is exposed in .Net, I dunno -- I only linked to the Win32 page because that's what I'm used to.

pipakin
05-30-2008, 12:12 PM
I miss my coding days ;( . Wasn't one of the best coders, but i knew a great deal. My new job just have me doing database stuff, I love it, but you don't make anything really look cool.

When I don't get enough satisfying coding at work I write addons or tools for games :)

pipakin
05-30-2008, 12:14 PM
Hrm, I'll have to brush up on my Win32 API then clearly. I've been buried in .Net coding too much lately :). Thankfully, I've just gotten a new jopb and should be moving towards more interesting coding then "design a web page to acess this database table"...bleh.
Grats on the new job. :) Maybe Raw Input is exposed in .Net, I dunno -- I only linked to the Win32 page because that's what I'm used to.

Thanks!

*shrug* If it is exposed, I haven't dealt with it. The coding at my current job is so straightjacketed we never get to do anything interesting or particularly useful for that matter. Thank the light for new opportunities.

tooboxinit
05-30-2008, 02:28 PM
Original Poster Here: To clarify on this a bit. I want to bind keys on the SECOND KEYBOARD to simple combinations on my first keyboard like you would in any other softawre that comes with the N52 or the G15. Imagine a WHOLE KEYBOARD full of G KEYS for example. yes it is more timely to move your hand to another keyboard but its easier then remembering 500 macros for 5 chars and stumbling over them, not all of us have photogrtaphic memories. I could bind all my keys to things that pertain to all my alts on it and use my main keyboard for my main char. Thanks for all your replies i like alot of your ideas.

Tehtsuo
05-30-2008, 03:19 PM
Again, I recommend http://www.download.com/Keyboard-Commander/3000-2084_4-10827173.html?cdlPid=10832559 I intend to add a numeric keypad I have laying around to my configuration.

tooboxinit
06-03-2008, 10:33 AM
I downloaded Keyboard Commander from ZDnet, it came with 6 trojans named New Malware.eb Dont download it, at least from there

tooboxinit
06-03-2008, 10:37 AM
I also just now downloaded it from the link you provided, the same trojans showed up.

Draku
06-04-2008, 06:17 AM
I am not sure if this has been posted already, but if you have two PCs HotKeyNet allows you to have both keyboards control either (or both) PCs such that each keyboard implements different behaviours.

(If you have 4 PCs you could have 4 keyboards with different behaviours for each keyboard)

Freddie
06-04-2008, 07:13 AM
Yep, if you have two PCs, HotkeyNet can do it, but not with a single PC. I read the Raw Input documentation pretty carefully the other day to see if I could add "one pc many keyboards" to HKN. Everything looked good except that with Raw Input, there doesn't seem to be a way to block the trigger key (the one that fires the hotkey) from passing to the foreground window. This might be okay for a pure broadcasting program but HKN is a hotkey program and it's supposed to offer the option with every hotkey of either passing or not passing the trigger key.

tooboxinit
06-04-2008, 09:54 AM
LOL well i do have a second PC right here. Maybe i could use it JUST for hotkeynet, and while im at it i could run napster and Ventrilo on it to to save my main pcs load. something to think about thanks guys

Freddie
06-04-2008, 10:33 AM
Then sure, you can do it that way. It will work like you wanted with two keyboards in one PC. The only difference will be a microscopic amount of latency, less than a millisecond (I measured it since my earlier post).

RogueLover
09-06-2008, 11:17 PM
just looked at this thread since I was wondering the same thing. since I don't have money for x-keys. I think I'm going to try Keyboard Commander ('http://store3.esellerate.net/store/catalog.aspx?s=STR3213447576&pc=') as well. I downloaded it and scanned it using my anti-virus and http://virusscan.jotti.org/ and there were no viruses or malware found. I'd like to use it on a spare keyboard or 10-key and just put some stickers over the keys for WoW related stuff.