More Keys or buttons

Tips, tactics, and general discussion for Evochron Legacy.
PaulB
Commander
Commander
Posts: 588
Joined: Sat Feb 22, 2014 11:25 pm

More Keys or buttons

Post by PaulB »

Does anyone know of a (hopefully not very expensive) Keypad controller or Button controller (USB) that I can get to Map keys??

I have a USB Numeric Keypad (this is all for my Laptop) that as the normal Game numeric kaypad mappings so I can't get another of those - I'm sure it would cause a system conflict.

I'm using an Xbox 360 controller so that has 12 buttons (actually the 2 buttons (one each) on the Analog sticks I don't consider all that useful (although I have them mapped) because it's not so eash to press them without affecting your pitch/yaw/thrusters as I have the 2 sticks mapped).
After all the Googling I can't find any other gamepads that have more than 12 buttons.
I have a Logitech 3D Extreme that has mor buttons but I hate it - it's so huge and bulky - I wish I hadn't bought it.

So what I want is something that is more or less just a game type keypad or buttons that I can map - if it also has a dpad or something that's ok - but mainly I just want some more buttons - and it can't be very big - because of my limited space - something similar in size to a USB Numeric Keypad.

Thanks,
Paul
Capt_Caveman
Commander
Commander
Posts: 967
Joined: Tue Mar 30, 2010 1:08 pm

More Keys or buttons

Post by Capt_Caveman »

this works, I wired it into my simpit

http://www.tomshardware.com/reviews/gam ... 67-15.html

there's other similar devices out there too

[Edited on 4-8-2014 by Capt_Caveman]
PaulB
Commander
Commander
Posts: 588
Joined: Sat Feb 22, 2014 11:25 pm

More Keys or buttons

Post by PaulB »

From post: 168653, Topic: tid=11324, author=Capt_Caveman wrote:this works, I wired it into my simpit

http://www.tomshardware.com/reviews/gam ... 67-15.html

there's other similar devices out there too

[Edited on 4-8-2014 by Capt_Caveman]
I saw the Saitek Cyborg Command Unit on amazon that someone was selling used for a ridiculous $185.

Paul
Capt_Caveman
Commander
Commander
Posts: 967
Joined: Tue Mar 30, 2010 1:08 pm

More Keys or buttons

Post by Capt_Caveman »

I had no idea, mine was a gift

there must be something else out there more reasonable
Noesis
Ensign
Ensign
Posts: 49
Joined: Thu Feb 20, 2014 12:32 pm

More Keys or buttons

Post by Noesis »

Just a thought I had, which may be something you're interested in is a program called autohotkey (ahk). It can let you map any key or key combo to any other key or key combo or sequence or mouse movements/clicks etc. It will however require a bit of learning in that it requires some scripting but it comes with a pretty good help file so learning isn't too difficult although it will be a lot easier if you do know some programming basics. It's freeware btw and I use it all the time in gaming to get my mouse or joystick to change the keys sent if a certain button is pressed when pressing a key or different keys again if a different button is pressed. (I actually use it with a Belkin n52te which isn't made anymore but it will work with any regular keyboard too). Anyway just a thought.
PaulB
Commander
Commander
Posts: 588
Joined: Sat Feb 22, 2014 11:25 pm

More Keys or buttons

Post by PaulB »

From post: 168664, Topic: tid=11324, author=Noesis wrote:Just a thought I had, which may be something you're interested in is a program called autohotkey (ahk). It can let you map any key or key combo to any other key or key combo or sequence or mouse movements/clicks etc. It will however require a bit of learning in that it requires some scripting but it comes with a pretty good help file so learning isn't too difficult although it will be a lot easier if you do know some programming basics. It's freeware btw and I use it all the time in gaming to get my mouse or joystick to change the keys sent if a certain button is pressed when pressing a key or different keys again if a different button is pressed. (I actually use it with a Belkin n52te which isn't made anymore but it will work with any regular keyboard too). Anyway just a thought.
That's not really the problem. virtually all the keyboard keys are already mapped. So I need a USB device to add more keys or buttons that can be mapped in the game.
I've only seen 4 or so devices - the one you mentioned and the one Captain mentioned and a Logitech and some Saitek's and they all start around $55 and go up.
They, IMO, are not worth it - especially when my 360 only cost 30something and Numeric keypads are <$20.
But as I said I have a numeric keypad so I can't use a 2nd one.
I may have to just do more remapping on the keyboard of keys replaced by buttons on the 360 and use those keey for the functions I want - I kinda hate to remap more than I already have though. The only place it will really help is if I free up the Arrow keys on the Laptop to use for the functions I want.

Paul
User avatar
SeeJay
Captain
Captain
Posts: 3507
Joined: Wed Aug 11, 2010 9:03 am
Location: Sweden

More Keys or buttons

Post by SeeJay »

I posted this a little while ago.
http://www.starwraith.com/forum/viewtopic.php?t=11302

Hook up your iPhone or iPad and program any functions, joystick move etc as you like.
Requires WiFi tho.
\"Nothing is impossible, it only takes a bit longer!\"
\"We are not retreating, we are advancing in another direction!\"


http://evochron.junholt.se (Old)
http://www.evochron2.junholt.se (New)
http://mercenary.junholt.se (Map)
http://www.junholt.se/evoschool/index.htm (No spoilers)
-8- Bzzzzzzzzz! -8- -8-
Image
PaulB
Commander
Commander
Posts: 588
Joined: Sat Feb 22, 2014 11:25 pm

More Keys or buttons

Post by PaulB »

From post: 168697, Topic: tid=11324, author=SeeJay wrote:I posted this a little while ago.
http://www.starwraith.com/forum/viewtopic.php?t=11302

Hook up your iPhone or iPad and program any functions, joystick move etc as you like.
Requires WiFi tho.
I saw that but I don't have an i-anything :)

Paul
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

More Keys or buttons

Post by raron »

This is an interesting question. I don't have any use for it myself at the moment though. I googled a bit around and found - maybe - a couple of possibilites. I haven't tried this myself yet (I don't have an extra keypad, but I have spare keyboards).

As most of the normal keyboard keys are mapped, it would seem one way is to use a virtual controller and map the extra keypad keys to its buttons.

HID macros seem to be able to differentiate keyboards (and other HID controllers) connected to a system. It is ment primarily for MS Flight Sim though, but can be used for other things. I don't know if it can redirect this to joystick buttons, everything kind of hinges on that. Perhaps / probably via some scripting.

Vjoy seems to fit the bill for a keyboard-to-virtual controller remapper. But of course - it doesn't quite work in Windows Vista or 7 (or 8?), as it can't block the original key presses.. but perhaps it's not needed if you can do that with some "HID macros" scripting? Or maybe if you do not use those keys (ordinary keypad keys) to anything, but map both the ordinary keyboard's keypad to a virtual joystick, and the extra keypad to another virtual joystick? If it can distinguish between the two keypads that is... Lots of IF's here.


Probably a long-shot, and I do not know if any of this works at all. I found some of this stuff here:
http://www.autohotkey.com/board/topic/7 ... keyboards/
http://www.autohotkey.com/board/topic/3 ... functions/

There seems to be a rather involved solution with AHK (AutoHotKey) buried there, but that seems to necessitate learning some AHK scripting.

Also, perhaps the xbox360ce (controller emulator) is of some use? https://code.google.com/p/x360ce/

Just tossing out some suggestions.
User avatar
DaveK
Global Moderator
Global Moderator
Posts: 4161
Joined: Mon Apr 19, 2010 9:04 pm
Location: Leeds UK

More Keys or buttons

Post by DaveK »

Might be too expensive for what you want, but I bought a Thrustmaster Replica U.S Air Force MFD Cougar Flight Panel Duo Pack. It'll be much cheaper in the USA (In the UK we pay the $ price but in £ :(

http://www.starwraith.com/forum/viewtopic.php?t=11447

- each one gives 20 buttons (4 banks of 5) plus 4 x 2-way rocker buttons (=8 buttons) giving 28 buttons per unit = 56 buttons in total. :cool: Oops - edited for mis-maths!!

I'm very pleased with the result!

:)

[Edited on 12-7-2014 by DaveK]
Callsign: Incoming
Image
Life is like a sewer... what you get out of it depends on what you put into it. - Bob Newhart
Hell is being in a pure platinum asteroid field... with a diamond mining beam
ImageImage
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

More Keys or buttons

Post by raron »

Sorry for this long and messy post.

I couldnt quite let this be (though I'm ready to let it go now, I think :P), so I tried some more. I managed to hack together a couple of AutoHotKey scripts.

Unfortunately, in "Configure keyboard and buttons control" settings, Evochron Mercenary still detects keypresses from my second keyboard as if its the system default keyboard (like anything else in windows). Even if it's set up to run a script from HIDmacros. In other applications (Notepad++ etc) the extra keyboard keys are not seen. It seems maybe EM also reads the keyboards in a more direct way. So I'm not sure what to do about that. And basically that's that.


In case anyone is interested or want to have a go at it, I attach my scrips to this post along with some minor detail below:


The scripts* "presses" the virtual joystick buttons. The buttons are also detected by EM, but probably a bit later than the actual keypress, so they are not registered. Only the keyboard keys are registered (which is most likely in conflict with other controls ofc).

As for the virtual joystick, I found that the vJoy from Headsoft (linked above) is not needed (and seemingly have a 5-minute timeout built in, making it useless anyway, but I haven't actually tested that). Instead, I used the same-named vJoy at SourceForge, which worked great.


* Two scripts, one in the background that communicates to the vJoy driver, and another one which is started from HIDmacros with command line arguments. And thus the latter starts and stops every time a virtual joystick button is to be pressed. Takes a little bit of time, but still quicker and cleaner i think than having it open and close the joystick driver all the time (ofc, I don't really know AHK scripting, and certainly not how to do dll function calls, which is a blatant copy-paste-modify).


Installing / usage

You will need:
AutoHotKey (pretty sure that's the 32 bit version on the big download button. I'm sure I found the 64 bit somewhere there too)
vJoy virtual joystick driver
vJoy SDK
HIDmacros


After installing vJoy, one must set it up by running "Configure vJoy". I made one controller, nr. of axis don't matter too much I think, I only use the buttons here. I selected 32 buttons (maximum in directX I think?) though vJoy goes all the way up to 128 now (I haven't tested more than 32 yet).

Then it's a matter of saving the scripts somewhere, copy the correct vJoyInterface.dll to the same folder and set up HIDmacros...

After all that, you need to run "VJoy_monitor.ahk" (AHK icon will be visible in the system tray), and HIDmacros. Then HIDmacros will catch any keypresses you set up (from anything that registers as a keyboard I suppose, like number pads), and run the scripts that will convert it to virtual joystick button presses. In theory, at least.



Some more details:

VJoy_lib.ahk

Is basically from this thread and is the hard work from user "axlar", and I only commented out the Tooltips (I wouldn't know heads or tail about how to do this otherwise).

Pay attention to what he says in that post about 32 and 64-bit versions of AutoHotKey and the corresponding version of vJoy library.

For 64 bit, you want to download the SDK linked above, and extract vJoyInterface.dll from SDK/lib/amd64/. For 32-bit version of AutoHotKey the 32-bit version of vJoyInterface.dll is needed, from SDK/lib (I tried both, briefly, seems to work). Except when compiling ahk scripts, I haven't made the 64 bit compile (I only tested the scripts as scripts), as the compiler from the AHK installer seems 32 bit (?) and I haven't tried compiling the 32 bit version.


VJoy_send.ahk

("Inspired" from http://www.autohotkey.com/board/topic/5 ... orkaround/)
This is the script that needs to be called from HIDmacros, with 2 arguments: Virtual joystick ID nr (always 1 for now), and button nr.

Unfortunately, HIDmacros can be a bit tedious to set up. One needs to configure each key within HIDmacros, by making a new macro for each key, naming that macro preferably something sensible, click "Scan" and then press a key (on the correct keyboard), select "Run Application", browse to the VJoy_send.ahk, and edit the command line to include the ID nr (always 1) and button nr you wish to press as arguments. The command line can for example look like this:

Code: Select all

D:\\Documents\\programming\\AHK\\VJoyButtons\\VJoy_send.ahk 1 6
to press virtual joystick button nr. 6. (or nr. 5 as it's displayed in EM).

As I didn't get this to work with EM, I have only configured a very few buttons for test purposes. And HIDmacros macros are a bit unpractical to upload anyway, as it only saves them in its own folder and also buried in an xml file. I simply have HIDmacros installed in a (simply copied to) subfolder where the AHK scripts are atm.


VJoy_monitor.ahk

is the script that need to run in the background all the time, which receives button presses from VJoy_send, and then press the virtual buttons for about 0.1 seconds.


[file]876[/file]

[file]877[/file]

[file]878[/file]
You do not have the required permissions to view the files attached to this post.
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

More Keys or buttons

Post by raron »

Solved it!

It's still just a work-around though.

I tried UJR - Universal Joystick Remapper (so I could combine the clutch and accellerator pedal for rudder instead of the middle brake pedal - which works great btw). This is also made in AutoHotKey.

UJR have a pretty ingenious "Quickbind" method, and that's what solved the main problem (pretty obvious now that I know about it). So I adopted that idea to my virtual button masher above. Renamed and improved the scripts a bit, and included another script to make the HIDMacros configuration file automatically (no manual copy-pasting of xml data). Tested with 3 keyboards just for kicks, remapped their numpads to virtual controller buttons. The actual numpad keys will have to be unused in-game (as the game or windows cant distinguish between them).

It's a little bit of lag between keypress and button press, I guess around 0.1 seconds or thereabouts, but your mileage might vary. Still pretty useable imho, except maybe for weapons (I haven't tested extensively).

The virtual button presses are only momentary though (lasts about 0.1 seconds - unrelated to the lag mentioned above btw). I might look into making press-down and up-events, but I'm not promising anything.

Not that I have very much use for this myself, not right now at least. I just got a little cought up in this :)

Innstallation description is in ReadMe.txt in the attached .rar file, if anyone is interested.


[file]884[/file]


EDIT:

Btw I don't think the lag is as much as 0.1 seconds, but I haven't actually measured it, it was just me "eyeballing" it in the settings screen. Just saying.

Also, I wanted to add that UJR mentioned above also solved another issue I had, with the POV hats. They didn't work with this game before, but now I can remap those to the same virtual controller that I combined the clutch and accellerator axis with. Too cool! :)

[Edited on 2014-8-5 by casualgamer]
You do not have the required permissions to view the files attached to this post.
Ohsirus
Lieutenant
Lieutenant
Posts: 242
Joined: Mon Jun 29, 2009 12:36 am

More Keys or buttons

Post by Ohsirus »

From post: 168651, Topic: tid=11324, author=PaulB wrote:Does anyone know of a (hopefully not very expensive) Keypad controller or Button controller (USB) that I can get to Map keys??

I have a USB Numeric Keypad (this is all for my Laptop) that as the normal Game numeric kaypad mappings so I can't get another of those - I'm sure it would cause a system conflict.

I'm using an Xbox 360 controller so that has 12 buttons (actually the 2 buttons (one each) on the Analog sticks I don't consider all that useful (although I have them mapped) because it's not so eash to press them without affecting your pitch/yaw/thrusters as I have the 2 sticks mapped).
After all the Googling I can't find any other gamepads that have more than 12 buttons.
I have a Logitech 3D Extreme that has mor buttons but I hate it - it's so huge and bulky - I wish I hadn't bought it.

So what I want is something that is more or less just a game type keypad or buttons that I can map - if it also has a dpad or something that's ok - but mainly I just want some more buttons - and it can't be very big - because of my limited space - something similar in size to a USB Numeric Keypad.

Thanks,
Paul
Not sure if you ever tried Xpadder, but I used it extensively for EL and it provides a ton of functionality to the X360 pad, feedback,mouse control, switch configs on the fly.
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

More Keys or buttons

Post by raron »

Procrastination side-effects from a boring night/day :)
(Sorry for hijacking this thread... I might also host this elsewhere later)

The main script to run is (still) vJoy_ButtonPusherDaemon.ahk, from which everything else is configurable (My test settings are included, which you'd need to change). As before, installation instructions in ReadMe.txt (I tried not to make a book out of it).

It still only remaps the numpads of different keyboards, to different virtual controller buttons (from 15 to 27 buttons each, depending on settings). I made the ENTER key optional as well, otherwise it should function as the above version.

Hopefully, it is a bit more user friendly.


EDIT:

Err, I sort of had the wrong version of AutoHotKey linked all this time.. Fixed (finally)! Btw the correct version is obtainable at http://ahkscript.org/
Which also solved the mystery of the 32 and 64-bit versions of it (in the AHK program folder after installing it).


[file]912[/file]

[Edited on 2014-8-11 by casualgamer]
You do not have the required permissions to view the files attached to this post.
PaulB
Commander
Commander
Posts: 588
Joined: Sat Feb 22, 2014 11:25 pm

More Keys or buttons

Post by PaulB »

From post: 172284, Topic: tid=11324, author=Ohsirus wrote:
From post: 168651, Topic: tid=11324, author=PaulB wrote:Does anyone know of a (hopefully not very expensive) Keypad controller or Button controller (USB) that I can get to Map keys??

I have a USB Numeric Keypad (this is all for my Laptop) that as the normal Game numeric kaypad mappings so I can't get another of those - I'm sure it would cause a system conflict.

I'm using an Xbox 360 controller so that has 12 buttons (actually the 2 buttons (one each) on the Analog sticks I don't consider all that useful (although I have them mapped) because it's not so eash to press them without affecting your pitch/yaw/thrusters as I have the 2 sticks mapped).
After all the Googling I can't find any other gamepads that have more than 12 buttons.
I have a Logitech 3D Extreme that has mor buttons but I hate it - it's so huge and bulky - I wish I hadn't bought it.

So what I want is something that is more or less just a game type keypad or buttons that I can map - if it also has a dpad or something that's ok - but mainly I just want some more buttons - and it can't be very big - because of my limited space - something similar in size to a USB Numeric Keypad.

Thanks,
Paul
Not sure if you ever tried Xpadder, but I used it extensively for EL and it provides a ton of functionality to the X360 pad, feedback,mouse control, switch configs on the fly.
Yes I use xpadder - the problem is one gamepad does not have enough buttons to suit me. I've since posting made some changes.
(1) I bought a Razer Sabertooth so i can remap some of it's buttons like the ones on the analog sticks to the "extra" rocker switches on the bottom as well as the Back & Start buttons which makes them easier to activate while using my thumbs to control the Sticks. I also have the Dpad mapped as 4 buttons (set as an 8 way pad with the corner's unmapped so as to avoid mis-keying the 4 Cross mapped buttons of the Dpad.
(2) I hooked up my Logitech F310 gamepad as well and have it sitting to my left but turned 180 degrees and I have it's buttons mapped, some in EM and some through Xpadder so I now have more buttons - though I would prefer a single Gamepad that had more than 10 buttons and all available with both hands.
(3) I have a Footswitch I got on Amazon that has 3 foot switches on it and has software that you can map the switches to any keyboard keys.

So, the Footswitch controls:
Reverse Thrust, Inertial Reverse, Inertial Forward

Logiteect F310 (turned 180 degrees and on my left) set:
A = Jump, B = Nearest Hostile, X = Next Hostile, Y = Reverse Thrust + Afterburn (on the left)
...A...
B....X
...Y...
Dpad (on the right) set in EM to Pan
Start set in Xpadder to key Shield Energy to 5/-5
Back set in Xpadder to key Weapon Energy to -5/5
RB = View Up
LB = View Rear
RT = View Left
LT = View Right
Right Stick Button = Nearest Target
Left Stick Button = Next Target
Razer Sabertooth set:
Left Stick = Turn/Pitch
Left Stick Button = Inertial On/Off --> Left-Front Rocker
Right Stick = Strafe
Right Stick Button = Fire Beam --> Right-M2 Button
Back = Shield Energy --> Left-Rear Rocker
Start = Weapon Energy --> Right-Rear Rocker
Dpad set in Xpadder to Nearest Hostile, Contermeasures x3, Target in Crosshair, Stop Engines
null....................CMx3...................null

Nearest Hostile...........Target in Crosshair

null....................Stop....................null
A = Afterburn
B = Accelerate
X = Decelerate
Y = Fire Particle --> Right-Front Rocker
LB = Fire Missile......RB = Fire Both Guns
LT = Roll Left..........RT = Roll Right

[file]913[/file]

[file]915[/file]
You do not have the required permissions to view the files attached to this post.