Author Topic: Alternate Layout with DirectInput(steam)  (Read 4435 times)

0 Members and 1 Guest are viewing this topic.

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« on: Fri, 07 January 2011, 18:20:26 »
I installed cs 2day and changed my binds to match my layout(colemak).
bind "w" "+forward"
bind "a" "+left"
bind "r" "+back"
bind "s" "+right"
it didnt work. cs recognized only qwerty in game. i got the hhkb pro 2 and i think there is no way for me to mod the driver.

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #1 on: Tue, 11 January 2011, 19:04:06 »
tried using autohotkey sendInput and sendEvent which are supposed to work in game but they havent. any way i can flash a driver to the kb?

Offline hoggy

  • * Ergonomics Moderator
  • Posts: 1502
  • Location: Isle of Man
Alternate Layout with DirectInput(steam)
« Reply #2 on: Wed, 12 January 2011, 01:22:42 »
Looks like you might want to search ebay for a POS keyboard.  There's a good number of firmware programmable black cherry keyboards out there.  Most are ugly.

Someone here is selling a very nice desko - have a look here.
GH Ergonomic Guide (in progress)
http://geekhack.org/index.php?topic=54680.0

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #3 on: Wed, 12 January 2011, 01:34:14 »
Have you tried using registry based scan code remapping?

You'll have to reboot each time you want to switch back and forth, but it *should* work with any Windows program/any keyboard. I'm fairly sure it's lower level than DirectInput even.

Caps lock example/explanation
A nicely laid out .reg example/directions

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #4 on: Wed, 12 January 2011, 11:29:34 »
will this work? i didnt change the count as i didnt know where to.
Quote
"Scancode Map"=hex:00,00,00,00,00,00,00,00,\
;

------------------------------------------------------------------------

---
; BE SURE TO UPDATE THE COUNT BELOW TO REFLECT THE TOTAL NUMBER OF

REMAPS + 1 (and write it as hexadecimal, not decimal)
; (1 extra for the null terminator):
;

------------------------------------------------------------------------

---
;e-f
12,00,21,00,\
;r-p
13,00,19,00,\
;t-g
14,00,22,00,\
;y-j
15,00,24,00,\
;u-l
16,00,26,00,\
;i-u
17,00,16,00,\
;o-y
18,00,15,00,\
;p-;
19,00,27,00,\
;s-r
1F,00,13,00,\
;d-s
20,00,1F,00,\
;f-t
21,00,14,00,\
;g-d
22,00,20,00,\
;j-n
24,00,31,00,\
;k-e
25,00,12,00,\
;l-i
26,00,17,00,\
;;-o
27,00,18,00,\
;n-k
31,00,25,00,\

; 04. Null Terminator -- be sure to change the count at the top to

reflect this number.
00,00,00,00

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #5 on: Wed, 12 January 2011, 13:02:24 »
Quote from: v193r;277396
will this work? i didnt change the count as i didnt know where to.


sorry, about to fall asleep from flu medication, so not going to check the scan codes right now. I'll add the count back in for you, but you may want to check the counting/math D:

(see the part I  inserted/highlighted in red)

Quote
"Scancode Map"=hex:00,00,00,00,00,00,00,00,\
;

------------------------------------------------------------------------

---
; BE SURE TO UPDATE THE COUNT BELOW TO REFLECT THE TOTAL NUMBER OF

REMAPS + 1 (and write it as hexadecimal, not decimal)
; (1 extra for the null terminator):
;

------------------------------------------------------------------------

---
12,00,00,00,\
;e-f
12,00,21,00,\
;r-p
13,00,19,00,\
;t-g
14,00,22,00,\
;y-j
15,00,24,00,\
;u-l
16,00,26,00,\
;i-u
17,00,16,00,\
;o-y
18,00,15,00,\
;p-;
19,00,27,00,\
;s-r
1F,00,13,00,\
;d-s
20,00,1F,00,\
;f-t
21,00,14,00,\
;g-d
22,00,20,00,\
;j-n
24,00,31,00,\
;k-e
25,00,12,00,\
;l-i
26,00,17,00,\
;;-o
27,00,18,00,\
;n-k
31,00,25,00,\

; 04. Null Terminator -- be sure to change the count at the top to

reflect this number.
00,00,00,00

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #6 on: Wed, 12 January 2011, 13:13:12 »
Also looking at what you're changing again, just a reminder, this will affect *everything* once windows loads with it set until you remove it and reboot again. Including fun things like entering passwords for logging in and such

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #7 on: Wed, 12 January 2011, 13:37:43 »
12,00,00,00,\
does this change e to watever 00,00 is?
also i have no prob changin everything i have learnt colemak and have solely used it for 5 weeks.

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #8 on: Wed, 12 January 2011, 22:22:04 »
No, that's the segment for the count (in hex, +1)

Basically it's 0 padding, Count (dword, little-endian), Remaps (dword)*, null terminator

where Count is the number of dword elements between the padding and terminator including Count itself. Assuming we mean 16 bit words. And maybe it's that Count is a word and null separator, but/... Back to sleep tiems ~.~;

Anywho, if the remaps are correct it should work. I've used it for making Caps lock act as control, left Windows key act as Caps lock, and things like making the slash on the number pad be tab before (very nice when doing lots of numeric form entry on a regular keyboard). Make sure you have the comment character (semi-colon) on the start of those lines with the dashes.

It's easier to build it that way on separate lines, but if the interpretor has issues it might be easier to spot formatting trouble by copying to a single line entry in another file, without all the commenting and line continuations. Hopefully it works fine and solves your troubles! ^^;
« Last Edit: Thu, 13 January 2011, 11:17:24 by taswyn »

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #9 on: Thu, 13 January 2011, 11:23:17 »
I reviewed the first few remaps, they looked correct. Assuming the rest are correct, and you fixed the commenting if it was off, it should be fine.

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

"Scancode Map"=hex:00,00,00,00,00,00,00,00,\
; ---------------------------------------------------------------------------
; BE SURE TO UPDATE THE COUNT BELOW TO REFLECT THE TOTAL NUMBER OF REMAPS +1 (and write it as hexadecimal, not decimal)
; ---------------------------------------------------------------------------
12,00,00,00,\
; ---------------------------------------------------------------------------
; Now the remaps:
; e-f
12,00,21,00,\
; r-p
13,00,19,00,\
; t-g
14,00,22,00,\
; y-j
15,00,24,00,\
; u-l
16,00,26,00,\
; i-u
17,00,16,00,\
; o-y
18,00,15,00,\
; p-;
19,00,27,00,\
; s-r
1F,00,13,00,\
; d-s
20,00,1F,00,\
; f-t
21,00,14,00,\
; g-d
22,00,20,00,\
; j-n
24,00,31,00,\
; k-e
25,00,12,00,\
; l-i
26,00,17,00,\
; ;-o
27,00,18,00,\
; n-k
31,00,25,00,\
; Null Terminator
00,00,00,00


I cleaned up the whitespace a bit so comments are actually on the correct lines, some of them had been split for some reason, which would not have made regedit happy.

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #10 on: Thu, 13 January 2011, 11:41:43 »
it worked meaning it add to registry. but it didnt work in game and overide directinput.

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #11 on: Thu, 13 January 2011, 13:22:40 »
Well shoot. I thought that sat deep enough to be below even DirectInput's keyboard IO stream.

Let me look a bit more, but you may need to resort to a custom keyboard driver/filter. That or a filtering hardware dongle (overkill except when you need a zero install option for multiple systems) are the two sure options I can think of immediately, without switching keyboards. I'm really sorry the remap wasn't enough, I'd really assumed it would be =(

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #12 on: Thu, 13 January 2011, 14:44:53 »
forgot to restart th computer after the reg. just did and im back on qwerty somehow. didnt test it in game thou. someone on geekhack has done a custom layout mod on their hhkb using teensy but it was for their hhkb1 and i have the hhkb2.

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #13 on: Thu, 13 January 2011, 16:42:17 »
Quote from: v193r;278081
forgot to restart th computer after the reg. just did and im back on qwerty somehow. didnt test it in game thou. someone on geekhack has done a custom layout mod on their hhkb using teensy but it was for their hhkb1 and i have the hhkb2.


That sounds like there is an error somewhere in the string if it's acting like qwerty after a reboot. Maybe open the registry editor to that entry and confirm it went in correctly? But, yes you need to reboot after any changes for it to take effect.

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #14 on: Thu, 13 January 2011, 17:38:50 »

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #15 on: Thu, 13 January 2011, 18:30:10 »
Just took some more medicine earlier and falling asleep... it seems to look right though. I'll look again in the morning and try loading it on my desktop.

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #16 on: Fri, 14 January 2011, 07:51:59 »
qwksfoil;r
adgethynup
zxcvbjm,.

^
that's what I get for typing each row of keys with that regedit applied... and logging in and typing this was fun D: (had to use the onscreen keyboard to log in even D:   )

brb on the tablet =P

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #17 on: Fri, 14 January 2011, 08:15:12 »
So being a bit more lucid today, it's immediately obvious what went wrong with the mapping at least. It's supposed to exactly the reverse of that order, for each individual mapping.

 Sorry I should have caught that when looking at the scan codes =/ I didn't take the time to lookup Colemak, just compared the codes to the letters in the comments.

It's not a hard thing to fix, what I can't figure out is why you would still be seeing normal QWERTY behavior with that registry key in. I'll get it working properly on my main computer and then attach the fixed .reg file.

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #18 on: Fri, 14 January 2011, 10:33:10 »
its because i had colemak on thru keyboard settings. i also got this at one point:
qwksfoil;r
adgethynup
zxcvbjm,.
i goin to try to test colemak regedit in game, its provided here:
http://colemak.com/Registry_remapping

Offline v193r

  • Thread Starter
  • Posts: 73
Alternate Layout with DirectInput(steam)
« Reply #19 on: Fri, 14 January 2011, 13:55:06 »
problem fixed thru colemak reg edit. now i have colemak in game. ^_^

Offline taswyn

  • Posts: 89
Alternate Layout with DirectInput(steam)
« Reply #20 on: Sun, 16 January 2011, 06:06:07 »
Yay ^.^ I'm really glad to hear that the reg edit route was the right way to go and fixed everything for DirectInput, once it was going in the right way ^^;

It was a good catch to notice that Colemak.com had a pre-done .reg ^^; I wish I had though to look there first =P