VOGONS


First post, by Lylat1an

User metadata
Rank Member
Rank
Member

I apologize if this was the wrong place to ask, but it seemed the most appropriate on this site.

My goal is to use macros to make a few Windows keyboard shortcuts work on an IBM model M despite the keyboard not having Windows keys: For example Win+E would become ALT+E to open File Explorer, without remapping ALT to a Windows key.

However, the programmer isn't accepting my codes. Can somebody help me troubleshoot them?

# Layers
layerblock
# Layers here
endblock

# Remappings
remapblock
# Remappings here
endblock

# Macros
macroblock
# Macros here
macro LALT E
MAKE LGUI
PRESS E
BREAK LGUI
endmacro

macro LALT G
MAKE LGUI
PRESS G
BREAK LGUI
endmacro

macro RALT PAUSE
MAKE RGUI
PRESS PAUSE
BREAK RGUI
endmacro
endblock

Reply 1 of 10, by snufkin

User metadata
Rank Oldbie
Rank
Oldbie

You may need to use PUSH_META, CLEAR_META and POP_META. At the moment for Win-E it's probably doing Alt-Win-E.

For example, on a Model F I've used this:

	macro F2 RALT
PUSH_META CLEAR_META RALT
PRESS F12
POP_META
endmacro

to put F12 on RAlt-F2, having previously put RALT on Caps-Lock.

Reply 2 of 10, by Lylat1an

User metadata
Rank Member
Rank
Member
snufkin wrote on 2022-09-05, 09:32:
You may need to use PUSH_META, CLEAR_META and POP_META. At the moment for Win-E it's probably doing Alt-Win-E. […]
Show full quote

You may need to use PUSH_META, CLEAR_META and POP_META. At the moment for Win-E it's probably doing Alt-Win-E.

For example, on a Model F I've used this:

	macro F2 RALT
PUSH_META CLEAR_META RALT
PRESS F12
POP_META
endmacro

to put F12 on RAlt-F2, having previously put RALT on Caps-Lock.

I tried putting those meta codes in, now the programmer is giving me an "INVALID ARGUMENT" error on line 15.

# Layers
layerblock
# Layers here
endblock

# Remappings
remapblock
# Remappings here
endblock

# Macros
macroblock
# Macros here
macro E LALT
PUSH_META CLEAR_META LGUI
PRESS E
POP_META LGUI
endmacro

macro G LALT
PUSH_META CLEAR_META LGUI
PRESS G
POP_META LGUI
endmacro

macro PAUSE RALT
PUSH_META CLEAR_META RGUI
PRESS PAUSE
POP_META RGUI
endmacro
endblock

Reply 3 of 10, by snufkin

User metadata
Rank Oldbie
Rank
Oldbie

I think it needs to be CLEAR_META RALT (for the Right Alt key), and then just POP_META

I can't test it right now, but something like:

macro E LALT
PUSH_META CLEAR_META LALT
MAKE LGUI
PRESS E
BREAK LGUI
POP_META
endmacro

That should execute the macro with Left-Alt+E. First it clears the Left-Alt, then holds down the Win key, then presses and releases 'E', releases the Win key and finally puts the Alt key back as it was (held down).

Reply 4 of 10, by Lylat1an

User metadata
Rank Member
Rank
Member
snufkin wrote on 2022-09-05, 16:11:
I think it needs to be CLEAR_META RALT (for the Right Alt key), and then just POP_META […]
Show full quote

I think it needs to be CLEAR_META RALT (for the Right Alt key), and then just POP_META

I can't test it right now, but something like:

macro E LALT
PUSH_META CLEAR_META LALT
MAKE LGUI
PRESS E
BREAK LGUI
POP_META
endmacro

That should execute the macro with Left-Alt+E. First it clears the Left-Alt, then holds down the Win key, then presses and releases 'E', releases the Win key and finally puts the Alt key back as it was (held down).

I'm still getting the same error on line 15. Here's what my code looks like now.

# Layers
layerblock
# Layers here
endblock

# Remappings
remapblock
# Remappings here
endblock

# Macros
macroblock
# Macros here
macro E LALT
  PUSH_META CLEAR_META LALT
  MAKE LGUI
PRESS E
  BREAK LGUI
POP_META
 endmacro

macro G LALT
PUSH_META CLEAR_META LALT
MAKE LGUI
PRESS G
BREAK LGUI
POP_META
endmacro

macro PAUSE RALT
PUSH_META CLEAR_META RALT
MAKE RGUI
PRESS PAUSE
BREAK RGUI
POP_META
endmacro
endblock

Reply 5 of 10, by Lylat1an

User metadata
Rank Member
Rank
Member
Lylat1an wrote on 2022-09-05, 17:24:

On a hunch, I converted the spaces at the beginning of the code lines to tabs, and they were all accepted.

But the shortcuts aren't activating.

# Layers
layerblock
# Layers here
endblock

# Remappings
remapblock
# Remappings here
endblock

# Macros
macroblock
# Macros here
macro E LALT
CLEAR_META LALT
MAKE LGUI
PRESS E
BREAK LGUI
SET_META LALT
endmacro

macro G LALT
CLEAR_META LALT
MAKE LGUI
PRESS G
BREAK LGUI
SET_META LALT
endmacro

macro PAUSE RALT
CLEAR_META RALT
MAKE RGUI
PRESS PAUSE
BREAK RGUI
SET_META LALT
endmacro
endblock

This code was accepted as well, but the shortcuts don't operate either.

# Layers
layerblock
# Layers here
endblock

# Remappings
remapblock
# Remappings here
endblock

# Macros
macroblock
# Macros here
macro E LALT
PUSH_META CLEAR_META LALT
MAKE LGUI
PRESS E
BREAK LGUI
POP_META
endmacro

macro G LALT
PUSH_META CLEAR_META LALT
MAKE LGUI
PRESS G
BREAK LGUI
POP_META
endmacro

macro PAUSE RALT
PUSH_META CLEAR_META RALT
MAKE RGUI
PRESS PAUSE
BREAK RGUI
POP_META
endmacro
endblock

Reply 6 of 10, by snufkin

User metadata
Rank Oldbie
Rank
Oldbie

Just read some of the documentation. The GUI keys look to be part of the meta keys, so maybe try:
SET_META LGUI and CLEAR_META LGUI rather than MAKE and BREAK

Reply 7 of 10, by Lylat1an

User metadata
Rank Member
Rank
Member
snufkin wrote on 2022-09-05, 18:29:

Just read some of the documentation. The GUI keys look to be part of the meta keys, so maybe try:
SET_META LGUI and CLEAR_META LGUI rather than MAKE and BREAK

It's still not working. I even tried simply remapping the LGUI and LALT keys without macros, that doesn't work either.

# Layers
layerblock
# Layers here
endblock

# Remappings
remapblock
# Remappings here
LALT LGUI
LGUI LALT
endblock

# Macros
macroblock
# Macros here
endblock

Could the problem be that my keyboard simply doesn't have the GUI keys? I thought the converter in the cable would generate them anyway.

Reply 8 of 10, by snufkin

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, the converter should be able to produce any key combination. The Model F has loads of missing keys, so that shouldn't be a problem. In my case I remapped F10 to LGUI, then could just use that. To get F10 I use RALT+F10.

Two things that might be useful to check are loading an even simpler config, and running hid_listen to find out what key code is being sent when you press the ALT key.

Something like:

remapblock
Z A
endblock

That should make the Z key type an 'a'. If it doesn't then it's likely there's something wrong with programming the converter. In Soarer's documentation it looks like LALT should show up as E2 in hid_listen and LGUI should be E3.

Reply 9 of 10, by Lylat1an

User metadata
Rank Member
Rank
Member
snufkin wrote on 2022-09-05, 21:49:
Yeah, the converter should be able to produce any key combination. The Model F has loads of missing keys, so that shouldn't be a […]
Show full quote

Yeah, the converter should be able to produce any key combination. The Model F has loads of missing keys, so that shouldn't be a problem. In my case I remapped F10 to LGUI, then could just use that. To get F10 I use RALT+F10.

Two things that might be useful to check are loading an even simpler config, and running hid_listen to find out what key code is being sent when you press the ALT key.

Something like:

remapblock
Z A
endblock

That should make the Z key type an 'a'. If it doesn't then it's likely there's something wrong with programming the converter. In Soarer's documentation it looks like LALT should show up as E2 in hid_listen and LGUI should be E3.

I ordered two of these converters, and neither seem to be working.

I'll contact the vendor, thanks for your assistance.

Reply 10 of 10, by snufkin

User metadata
Rank Oldbie
Rank
Oldbie

Do you have the various software tools for the converter, like scinfo? If you run that with the converter attached then it should tell you what version of the firmware the converter has. You can also use scrd to read the current config binary, then compare it with the one you've compiled yourself.