Page 1 of 1

Can't get backslash or pipe key working on IBM Model F XT

Posted: 19 Nov 2018, 10:30
by Fkazim
I have recently got my IBM Model F keyboard working on one of orihalcon's converters. But just have one problem my back slash key outputs a hash sign and my hash sign outputs a back quote.

I did all the key swapping with orihalcon's code and swapped the backlash key which outputs a hash with the hash key problem now is I got hash where it should be. But now I got to hash keys with no backslash btw my IBM Model F XT is a UK Layout and I got the soarers converter for the F XT.

Please help.

Posted: 19 Nov 2018, 10:58
by depletedvespene
Show us your .sc file so we can figure out what the problem is. Also, look at this basic remapping for the F XT, which quite probably does what you need: keyboards-f2/examples-of-soarer-convert ... ml#p390990

Posted: 19 Nov 2018, 16:13
by Fkazim
Thanks very much I will check that out.

Posted: 19 Nov 2018, 16:16
by Laser
Also, just to cover all bases, your keyboard layout set by the OS is UK or US? As it also has a role in translating the keys. Since you're from UK, you probably use the UK layout (so, nothing to change there), but there's no harm in asking.

Posted: 19 Nov 2018, 20:15
by Fkazim
uk layout in OS

Posted: 19 Nov 2018, 21:43
by Fkazim
all works Thanks so much for the code
:D

Posted: 19 Nov 2018, 21:45
by Fkazim
Another thing I was confused about was programming media controls.

More specifically i would like to make something like shift plus numpad 8 volume up and shift plus numpad 2 to be volume down and shift plus numpad 5 to be volume mute is that possible and if so could you give me an idea how this could be done Thanks.

Posted: 20 Nov 2018, 00:32
by depletedvespene
Fkazim wrote: Another thing I was confused about was programming media controls.

More specifically i would like to make something like shift plus numpad 8 volume up and shift plus numpad 2 to be volume down and shift plus numpad 5 to be volume mute is that possible and if so could you give me an idea how this could be done Thanks.
Add this to your .sc file, inside the macroblock segment:

Code: Select all

  macro PAD_2 ALT
    PRESS MEDIA_VOLUME_DOWN
  endmacro

  macro PAD_5 ALT
    PRESS MEDIA_MUTE
  endmacro

  macro PAD_8 ALT
    PRESS MEDIA_VOLUME_UP
  endmacro
Note that I've put Alt instead of Shift - it's not a very good idea to use the Shift layer on the numpad like that (remember that it normally toggles the meaning of a key with respect to what Num Lock says it'll do).

Posted: 20 Nov 2018, 18:02
by SneakyRobb
Have you used the HID-listen to confirm the output codes?
https://www.pjrc.com/teensy/hid_listen.html

On the USA layout the back quote key is beside enter. This key is backquote and the shift layer is tilde.

On the UK layout this key is hash with the shift layer being tilde.

So if Orihalcon sent you a converter setup for the USA or (sorry) standard layout this key was working for that layout.

In terms of the HID codes. Each pad gives off its own code which you then compare to the HID codes.

So you press say the 4th function key on the left side and it will likely give 0x3D code. You compare this to the codes in soarers documentation. And it sayd Keyboard F4.

Then if you want to remap F4 to say volume up, you look up the name of the volume up button. VOLUME_UP and use the method to replace that key.

So for codes related to hash and backslash.

0x20 Keyboard 3 and #
0x31 Keyboard \ and
0x32 Keyboard Non-US # and ~
0x64 Keyboard Non-US \ and |
0x32 Europe 1 (use BACKSLASH instead)

As you an see the keys related to hash and backslash actually have several codes associated with them. I suspect somehow these have been become a bit jumbled.
You should use the HID utility and the documentation for soarers converter found in this thread.
workshop-f7/xt-at-ps2-terminal-to-usb-c ... tml#p44332


Look at the output codes for the keys you are having trouble with.

Posted: 20 Nov 2018, 21:54
by AJM
depletedvespene wrote:
Fkazim wrote: Another thing I was confused about was programming media controls.

More specifically i would like to make something like shift plus numpad 8 volume up and shift plus numpad 2 to be volume down and shift plus numpad 5 to be volume mute is that possible and if so could you give me an idea how this could be done Thanks.
Add this to your .sc file, inside the macroblock segment:

Code: Select all

  macro PAD_2 ALT
    PRESS MEDIA_VOLUME_DOWN
  endmacro

  macro PAD_5 ALT
    PRESS MEDIA_MUTE
  endmacro

  macro PAD_8 ALT
    PRESS MEDIA_VOLUME_UP
  endmacro

If you want volume-up and -down to repeat, when you keep the key pressed, I would suggest:

Code: Select all

  macro PAD_2 ALT
     MAKE MEDIA_VOLUME_DOWN
  onbreak
     BREAK MEDIA_VOLUME_DOWN
  endmacro

  macro PAD_8 ALT
    MAKE MEDIA_VOLUME_UP
  onbreak
    BREAK MEDIA_VOLUME_UP
  endmacro

Posted: 21 Dec 2018, 22:06
by Howard81
I know this is a slightly old thread, but being a newbie to programming a Soarer's Converter this caused me a little head scratching too. However, if all you want to do is to get the keypresses on a UK layout Model F keyboard to match their printed legends use the following:

Code: Select all

# Remap to UK layout
# Requires UK layout to be selected in the OS

remapblock
  BACKSLASH	EUROPE_2
  BACK_QUOTE	BACKSLASH
endblock

Re: Can't get backslash or pipe key working on IBM Model F XT

Posted: 08 Apr 2019, 11:54
by Fkazim
Thanks a lot for letting me know about that easy fix to my layout problem I did get it working in the end but what I had to do was program the tilde key to the key next to 1! but your fix seems much better Thanks. BTW I do now have an IBM Model F AT with the normal sized keys please check out my restoration log if you are interested. It was a lot of work so it would mean a lot to me if you checked it out and it might even help you here is the link if you want to check it out viewtopic.php?f=2&t=21167

Thanks.