Page 1 of 7

I may be going slightly mad.......

Posted: Mon Jun 09, 2014 12:10 pm
by Bangbangduck
I quite like playing Oolite. To the extent where I fancy making a dedicated keyboard.

"Ah." Says you. "Another nutter fan, But it has been done before." You continue.

"It has." I reply. "But you forget one thing. I'm a fan nutter." I finished with an odd look in my eyes.

So that's the idea but taking it only a little further. It will involve chopping up a keyboard to get at the processor circuit. I can then make my own keypads up and wire them into the keyboard processor. I know you can buy but on a budget this is the only way to go.

Using the rather nice keyboard layout PDF from the oolite wiki I've used Gimp to set out the keygroups. Currently It's at eight.

Image

I just have to work out how the each group will be best laid out for functionality. I'm left handed so this will be arranged around the stick and throttle positioning. I have a nice office chair which will act as a base.

There are 59 Buttons in all! Some are duplicated due to their having a multi function use depending on situation in game. Others change use depending on combination keys. Usually Shift and or Ctrl are used to change the prime key function.

So in theory I would need the Shift and Ctrl duplicated a few times to allow proper use of my possible set up. But to save on a few buttons I've come up with a little circuit to do the Shift+Key and Shift+Ctrl+Key.

Image

I'll need a couple of these but the components, which I have anyway, are quite cheap. The circuit is based on 3 IC's.

The 555. An old but very versatile chip. In this instance it is acting like a clock pulse.
The 4015. An 8 Bit register. For every clock pulse it receives each output goes high sequentially. This chip is made up of 2 4Bit registers that can be independantly operated.
The 4066. A quad bilateral switch. Basically this chip has four solid state switches in it.

So the theory is, for a Shift+Ctrl+Key I have the appropriate key on my bespoke keypad wired to fire the 555 up. This also changes the state of the inverter. (The inverter applies, when dormant a positive voltage to the reset pin of the 4015. This stops it working regardless of a clock input.) The inverter goes low (negative voltage) which allows the 4015 to respond to the clock pulses.

So if I have Shift on the first output to the 4066, Ctrl on the second output, and Key on the Third Output.
Shift and Ctrl could be switched in any order so long as Key is the last switched the appropriate function will happen. The correct pins on the 4066 have to be taken to the correct points on the keyboard circuit of course. I've added an LED which lights up to confirm function when used. The 555 can be set to run at a fast clock so the switching will happen in an instant of operating the pad switch.

The 4015 stops because the register is full but when the pad switch is released the 555 stops and the inverter changes state appying a high (positive voltage) to the reset pin of the 4015 so all the outputs go low and the 4066 switches go off. Simples?

I should point out that the circuit and the keyboard circuit are isolated at the voltage level by the 4066 so nothing nasty should happen :shock:

So theres my plan of madness. I have a slightly older PC with a good card in it with a 15" monitor. This will form the core for the setup. Of course I still need a full keyboard as well but only to type file save names and name searching in the galactic charts.

BBD wibble wibble wibble!

Re: I may be going slightly mad.......

Posted: Mon Jun 09, 2014 12:20 pm
by maik
Exciting! Wonder how many of us would be interested in getting one of those as well... *cough*kickstarter*cough*

Re: I may be going slightly mad.......

Posted: Mon Jun 09, 2014 12:25 pm
by spud42
seems like a lot of effort to get the extra keys...
an PC keyboard has up to 108 keys. so there are plenty of unused keys. All you really needed to do was to edit the key bindings in the keyconfig.plist file.
its in oolite.app/resources/config..... just a thought...

Re: I may be going slightly mad.......

Posted: Mon Jun 09, 2014 3:28 pm
by mossfoot
Hell, I'd say "why make a new keyboard when you can make a control panel?" ;)

Create something with buttons, toggles, switches, etc, laid out like a cockpit dash? :D

Re: I may be going slightly mad.......

Posted: Mon Jun 09, 2014 8:27 pm
by Bangbangduck
Hi Chaps

Probably not explained myself very well. Mossfoot has hit the nail on the head though. I'm not so much looking to invent the keyboard as make a 'mini simpit type fing.

So chopping the keyboard up to get the circuit that decodes the keystrokes and plugs into the PC Rather than making the physical keyboard itself into something else. The keys may be useful as heads for new switches. The switches I can get will come to around £12. These are the small square types used in small circuits.

I did mention I was a nutter didn't I?

As for kickstarter there are already modules and things available for simpits. They are expensive! I am poor!! So this is my only recourse. I have been tracing out the Keyboard traces today so I can see which contacts on the circuit does what. There are 26 edge connects on this PCB 1 - 18 are the rows as it were and 19 - 26 are the columns. Where they cross determines what key stroke is read. I'm likely to be doing it tomorrow to. The traces are long tortueous and thin! My eyes are totally shot in poor light!

But if this works I'll make all the information available so anyone can have a go. Maybe the plist for the keystrokes will allow for single key strokes for everything rather than having to do the 'SHIFT+KEY/SHIFT+CTRL+KEY'? I don't know.

Other than that it just stops me going mental! well sort of.

BBD

Re: I may be going slightly mad.......

Posted: Mon Jun 09, 2014 8:27 pm
by Diziet Sma
mossfoot wrote:
Hell, I'd say "why make a new keyboard when you can make a control panel?" ;)

Create something with buttons, toggles, switches, etc, laid out like a cockpit dash? :D
Seconded!

Go for it, BBD! 8)

Re: I may be going slightly mad.......

Posted: Mon Jun 09, 2014 8:43 pm
by mossfoot
Good luck, Bangbangduck. I'm rootin for ya.

I'd love to have a simpit, but my thrustmaster throttle/joystick and a 46 inch TV screen are a decent enough substitute ;)

(okay, I don't get to use the big TV much because of the missus... mostly have to use my laptop. Sigh... :( )

Re: I may be going slightly mad.......

Posted: Tue Jun 10, 2014 7:45 am
by onno256
Hehe, someone is geeking out, have fun!

Re: I may be going slightly mad.......

Posted: Tue Jun 10, 2014 8:10 am
by The Griffin GT
Good luck with that BBD! Once you've finished that you can knock me up one of these http://www.razerzone.com/gb-en/gaming-k ... -orbweaver on the cheap, or preferably for free (You did say you were a nutter) :D

Re: I may be going slightly mad.......

Posted: Tue Jun 10, 2014 9:13 am
by Diziet Sma
The Griffin GT wrote:
Once you've finished that you can knock me up one of these http://www.razerzone.com/gb-en/gaming-k ... -orbweaver on the cheap, or preferably for free (You did say you were a nutter) :D
Looks like a fancier version of the old Belkin Nostromo controller.. (which I note with interest has now also been re-branded by Razer).. a mate had one for playing Unreal Tournament, over a decade ago.. absolutely brilliant piece of kit. I wouldn't mind getting one.. but at AU$200, that Orbweaver is rather too pricey for my blood..

A while ago, I got a Wolfclaw III Devour gamepad with intentions of using it for Oolite.. not too bad, but I couldn't get a configuration that also worked for a normal keyboard, for those times I didn't have it with me.. if the keys were programmable, it would have been great.

Re: I may be going slightly mad.......

Posted: Tue Jun 10, 2014 10:19 am
by spud42
Bangbangduck wrote:
Hi Chaps

Probably not explained myself very well. Mossfoot has hit the nail on the head though. I'm not so much looking to invent the keyboard as make a 'mini simpit type fing.

So chopping the keyboard up to get the circuit that decodes the keystrokes and plugs into the PC Rather than making the physical keyboard itself into something else. The keys may be useful as heads for new switches. The switches I can get will come to around £12. These are the small square types used in small circuits.

I did mention I was a nutter didn't I?

As for kickstarter there are already modules and things available for simpits. They are expensive! I am poor!! So this is my only recourse. I have been tracing out the Keyboard traces today so I can see which contacts on the circuit does what. There are 26 edge connects on this PCB 1 - 18 are the rows as it were and 19 - 26 are the columns. Where they cross determines what key stroke is read. I'm likely to be doing it tomorrow to. The traces are long tortueous and thin! My eyes are totally shot in poor light!

But if this works I'll make all the information available so anyone can have a go. Maybe the plist for the keystrokes will allow for single key strokes for everything rather than having to do the 'SHIFT+KEY/SHIFT+CTRL+KEY'? I don't know.

Other than that it just stops me going mental! well sort of.

BBD

oh i understood that you were making a "simpit" as you put it. i was just wondering why you would go to the trouble of the electronics you suggested when its not really required? hell lets go all the way . forget the hacked keyboard controller, get a rasp pi and hook the keys to it then in software you can stuff the keyboard buffer with the correct sequence of keystrokes...

or another alternative.... i have a Logitech G11 keyboard.. getting quite old now but it has 18 macro keys and 3 bank switches... with the logitech software you can send entire streams of key strokes with 1 press.... its a very handy option. the software also has delays between sending of keystrokes. use its controller....

So imagine you just came out of witchspace there is a pirate after you right away. press 1 key and a "evasive manouvers" sequence is sent . left ,right up down slow speed up...etc... very star trek. evasive pattern alpha... make it so....lol

there are other macro software available for normal keyboards too so another alternative... plus as a thought you could always replace some keys with a toggle switch instead of the normal momentary switches..... you could have a toggle for shift and control...

if i had the time i would love to build a Oolite custom control keyboard...lol

Re: I may be going slightly mad.......

Posted: Tue Jun 10, 2014 11:29 am
by maik
Bangbangduck wrote:
As for kickstarter there are already modules and things available for simpits. They are expensive! I am poor!!
I was thinking that if you make a really good Oolite keyboard and it also happens to be really good for Elite: Dangerous, then you could start a kickstarter to produce it... have it approved by Frontier, sort of "made for Elite", the works... :mrgreen:

Re: I may be going slightly mad.......

Posted: Tue Jun 10, 2014 6:27 pm
by Bangbangduck
Hi Chaps

Spud42: I see where your coming from. But I have tried getting into Arduino (similar to the cool Raspi) but I just don't have the ability to program much to my annoyance. I am one of those people quite prepared to wear cotton. But I have know idea how it works :wink: . The keyboard I have is what I had to hand and can afford to sacrifice for a bit of 'fun'. But if I had an uber keyboard... 8)

I'll look into the macro software idea. I'm also looking at the keyboard plist and seeing what unused keys there may be that I could bring to bare. I concur with the toggle switches etc there is a place for them Like activating each key group perhaps. Some keys I have kept with the seperate shift key because it 'works' There are only 2 instances of SHiFT+CTRL+KEY and only one of those is 'in game'.

Only 4 instances of SHIFT+KEY on single buttons exist at this time. One of which I think I can change to a single key command via the plist. EDIT: Just changed L to l to request docking clearance. That works :mrgreen: So I may well be able to reduce the key stroke combinations via the plist. Assigning other unused keys to replace a SHIFT+KEY looks very likely.

Maik: I just don't have right attitude. I can fit this in with my other duty's. Primarily carer for my wife. Plus no stress trying to meet deadlines. I'd love to but life is just too tight.

Onno256: Is Geeking out higher than a Nerd? I've been promoted? :D

Heres what I have been upto today. Traced and decoded the matrix (Neo has nothing on me!) 8)

Image

EDIT: I've been playing some more and there are enough unused keys to get rid of the SHIFT requirement which is useful.

The only Instance where I can't is the SHIFT+CTRL+^ which is the advanced Nav array (when in galactic maps view) It isn't listed in the plist. Anyone have a heads up on this? I assume if it has a command name as per all the others in the plist then it could be added and given a different key?

Also been thinking having toggle switches could be counter productive as far as game command keys. Purely because a keyboard works on momentary contact. Start 'sticking keys' and it could cause issues like ghosting or blocking. Basically to many keystrokes at the same time can cause other keys (unpressed) to act as if they have been pressed. Also there may be a limit to the number of keys pressed at anyone time. So any keys pressed over and above won't have any funtion. This is all variable depending on age of the keyboard and type (PS/2 or USB)

BBD

Re: I may be going slightly mad.......

Posted: Wed Jun 11, 2014 11:58 am
by spud42
with the macro software you can assign an unused key and then send a shift ctrl ^ that way you can have your keys arrayed as you like. Grouped by function or by mode ie flight,trade etc.. looks like a fun project and a lot easier than texturing a ship!!!!! or getting wings to do what you want!

you are using a separate joystick for nav if i remember? i have a couple of 4/8 way arcade microswitch joysticks. for mine i would hook this sucker up to the 4 arrow keys.

the PS2 keyboard controller may actually be a problem as its not hot swap like a USB keyboard. it has to be plugged in at boot. not a problem if you are making a dedicated oolite box ie booting straight into the game at startup. but then thinking about it you could always use a mouse to start the game from the desktop.. just any normal typing would be interseting...

Re: I may be going slightly mad.......

Posted: Wed Jun 11, 2014 3:52 pm
by Norby
Bangbangduck wrote:
SHIFT+CTRL+^
Ctrl+key functions are not definiable independently in keyconfig.plist but if you change the same key wihtout Ctrl then the Ctrl+key will be changed also.