Examples of Soarer Converter configuration files please

ghostdawg187

19 Oct 2018, 16:04

Ok, I see ;) I will follow your advice and boot windows on my wife`s laptop next time, because she has got this dual boot setup ;) Many thanks for your quick reply.

JBert

19 Oct 2018, 21:40

ghostdawg187 wrote: ii.) Assume I have manged to produce a vaild .sc-file, how do I proceed further under linux, so that my remap file will be applied by the converter?
If your Soarer tools work then it's just a matter of using these commands to do it:

Code: Select all

scas myconfig.sc tinkerboy.bc
scwr tinkerboy.bc
At least, that's all it takes me to do so on Windows.

ghostdawg187

21 Oct 2018, 15:24

JBert wrote:

Code: Select all

scas myconfig.sc tinkerboy.bc
scwr tinkerboy.bc
At least, that's all it takes me to do so on Windows.
I have decided to work on Windows. Is your quoted part the same syntax for Windows using tinkerboy's converter? If not, what is the correct syntax?

JBert

21 Oct 2018, 17:52

If "tinkerboy's converter" is running the Soarer Converter firmware underneath then those commands apply.

Seriously, just try, since Soarer's tools will communicate with the device to check the version it should quickly tell you if anything is wrong.

ghostdawg187

27 Oct 2018, 08:36

I have understood how to remap certain keys, but somehow I am really afraid to upload a layout to the converter just for try and error. I am afraid of to break the whole thing and afterwards I can't use it anymore or would need a configuration file to have the default settings.

I would like to have the "normal" navigation keys on the numpad. For instance the left arrow key is mapped to the left arrow key on the numpad. But when I activate numlock this should still give just the number 4.

How do I succeed in this concern?

PS: I hope my concern is somehow clear.

User avatar
Muirium
µ

27 Oct 2018, 13:19

I know why you’re fearful. But don’t worry. Soarer’s converter is strong! The smart thing about it is your layout “programming” does not overwrite the software. Your stuff is interpreted by his code, running underneath. You’re fine!

If you ever want to revert back to default settings, it’s as simple as sending it a blank file. His utilities: scas and scwr are your friends. They will stop you making nonsensical mistakes and they will save you from ever getting trapped.

Now: your numpad. This is what I do with mine:

Code: Select all

remapblock
layer 0
	num_lock	select_1	#	Toggle numpad to navigation block
endblock

ifselect 1
remapblock
layer 0
	pad_1		end
	pad_2		down
	pad_3		page_down
	pad_4		left
	pad_5		pad_5
	pad_6		right
	pad_7		home
	pad_8		up
	pad_9		page_up
	pad_0		ralt
endblock
I need all that because I’m on the Mac which ignores Num Lock. So I make a special navigation mode using select_1 which shifts the numpad into a new mode that I defined.

ghostdawg187

28 Oct 2018, 09:12

Thank you very much for your help, Muirium. I am really sorry for my silly questions. I am not quite sure what the part "layer 0" does. In the first part you assign "select_1" to num_lock. Then you define what is being remapped whenever you enter "select_1". But in both cases, what does "layer 0"?

User avatar
depletedvespene

28 Oct 2018, 12:50

ghostdawg187 wrote: Thank you very much for your help, Muirium. I am really sorry for my silly questions. I am not quite sure what the part "layer 0" does. In the first part you assign "select_1" to num_lock. Then you define what is being remapped whenever you enter "select_1". But in both cases, what does "layer 0"?
Soarer's converters allow remapping keys, and allow defining more than one remapping PER key. This is done in groups of remappings called layers: layer 0 is the base layer and others go "on top" of it, and the remapping that will be used is the "topmost" one.

Look up my own remapping for {M|F}122 keyboards, up in this thread (keyboards-f2/examples-of-soarer-convert ... ml#p425985). The bulk of it defines the remappings and macros for layer 0 (not explicitly defined, as is the default), and the tail part of it defines remappings for the layer 1, that make the numpad into a hexapad. When layer 1 is inactive, pressing the PAD_ASTERIX key will produce PAD_PLUS (as that is the remapping defined for it in layer 0), but when layer 1 is active, pressing the PAD_ASTERIX will produce the E key (not the letter E, the KEY that normally has an E painted over it). F16 in my remapping toggles on/off layer 1.

ghostdawg187

28 Oct 2018, 14:43

I thought there is a difference between function layers and ifselects. So in Muirium's example he defines how to enter ifselect_1 whenever he is in layer 0, by pressing Numlock. Afterwards he declares what should happen, when ifselect_1 is active. Once again layer 0 appears, that keeps me wondering.

So I assume defining something for layer 0, whatever ifselect has been chosen, is meant that it doesn't need any function key to apply. Is this right? (I am really confused somehow, I am sorry)

User avatar
Muirium
µ

28 Oct 2018, 16:11

ifselect is the most advanced thing Soarer’s converter does. I don’t 100% understand it now either! I came up with that system by a little trial and error. Here’s my complete configuration if you find that informative, but there’s a lot going on here (for several different keyboards) so most of it is irrelevant to your case.

Code: Select all

# General purpose, agnostic winkeyless and winkeyed PC keyboards
# Press Scroll Lock to toggle modifier layout
# Press Num Lock to engage Numpad navigation mode, PC style
# Both Insert and App key are Fn

# NMB Space Invader:
# Keyboard ID: AB83
# Code Set: 2 (extended)
# Mode: AT/PS2
# Same as winkeyed Cherry G8-3000. Maybe use a select to toggle win/winkeyless?

layerblock
	fn1			1
endblock

# Assume winkeyless, but toggle on Scroll Lock

remapblock
layer 0
	insert		fn1
	caps_lock	lctrl
	lctrl		lalt
	lalt		lgui
	ralt		rgui
	rctrl		ralt
	num_lock	select_1	#	Toggle numpad to navigation block
	scroll_lock	select_2	#	Winkeyed mods mode
endblock

remapblock
layer 1
	left_brace	up
	semicolon	left
	quote		right
	slash		down
	l			page_up
	period		page_down
	k			home
	comma		end
	a			volume_down
	s			volume_up
	d			mute
	backspace	delete
	1			f1
	2			f2
	3			f3
	4			f4
	5			f5
	6			f6
	7			f7
	8			f8
	9			f9
	0			f10
	minus		f11
	equal		f12
endblock

macroblock
#	Mac app window cycling, 60% style
	macro esc lgui -ctrl -alt
		press back_quote
	endmacro

#	Shift + Shift = Caps Lock
	macro lshift rshift
		press caps_lock
	endmacro
	macro rshift lshift
		press caps_lock
	endmacro
endblock

#	Swapped mods mode for Winkeyed boards
ifselect 2
remapblock
layer 0
	num_lock	select_1	#	Toggle numpad to navigation block
endblock

#	Numpad nav block - toggle with Num Lock
ifselect 1
remapblock
layer 0
	pad_1		end
	pad_2		down
	pad_3		page_down
	pad_4		left
	pad_5		pad_5
	pad_6		right
	pad_7		home
	pad_8		up
	pad_9		page_up
	pad_0		ralt
endblock
I rarely use selects in most of my Soarer converters. I don’t often need to. Layers are where most of the power lies for me.

My advice is to get some practice at layers and feel how they work before you dive into selects. Select is a macro function that reloads the entire config in an altered state, which is why knowing the basics first really helps.

ghostdawg187

29 Oct 2018, 12:37

I have played around and have finally succeeded with this .sc-file:

Code: Select all

# We remap some keys
remapblock
    F6 LGUI                    # F6 is now the left win-key
    CAPS_LOCK RALT             # CapsLock is now AltGr
    BACK_QUOTE BACKSLASH       # swap backquote and backslash
    BACKSLASH BACK_QUOTE
    # implement navigation cluster
    PAD_1 END                       
    PAD_2 DOWN
    PAD_3 PAGE_DOWN
    PAD_4 LEFT
    PAD_5 ENTER
    PAD_6 RIGHT
    PAD_7 HOME
    PAD_8 UP
    PAD_9 PAGE_UP
    PAD_PERIOD DELETE         
    SCROLL_LOCK APP           # scrolllock is now menu-key
endblock   

# regardless in which ifselect we are, numlock is the key 
# to toggle SELECT_1
ifselect any
remapblock
    NUM_LOCK SELECT_1
endblock

# definitions when SELECT_1 is active
ifselect 1
remapblock
    # restore numpad
    PAD_1 1
    PAD_2 2
    PAD_3 3
    PAD_4 4
    PAD_5 5
    PAD_6 6
    PAD_7 7
    PAD_8 8
    PAD_9 9
    PAD_0 0
    PAD_PERIOD PERIOD
    # have some navigation, also could address these with FN-layers
    W UP
    A LEFT
    S DOWN
    D RIGHT
    Q HOME
    Z END
    E PAGE_UP
    C PAGE_DOWN
endblock
Finally, this is what I wanted to achieve and now I can fully use my new/old IBM Model F XT. Thank you all for your patience and help :)

User avatar
ThePillenwerfer

08 Nov 2018, 00:30

Here's what I've set up to use with a couple of 84-key keyboards:—

Code: Select all

remapblock
        BACK_QUOTE EUROPE_2     # Get non-US backslash working
        EXTRA_SYSRQ LGUI        # Make SysReq work as Windows key (BTC)
        UNASSIGNED LGUI         # Make SysReq work as Windows key (Datacomp)
        PAD_PLUS PAD_ENTER      # Make + on num pad into a return key
        PAD_MINUS PAD_PLUS      # Make - on num pad into a + key
endblock

ifset set1 set2 
macroblock

# pause macro
macro NUM_LOCK ctrl
	PUSH_META CLEAR_META ctrl
	PRESS PAUSE
	POP_META 
endmacro

# Num printscreen macro
macro PAD_ASTERIX shift
	PUSH_META CLEAR_META shift
	PRESS PRINTSCREEN
	POP_META
endmacro

# break macro
macro SCROLL_LOCK ctrl
	PRESS PAUSE
endmacro

macro CAPS_LOCK                 # Make F9 and F10 work as F11 and F12 if caps lock is on
     	PUSH_META CLEAR_META
        Press CAPS_LOCK         # Normal caps lock operation
        Press SELECT_1          # Also set flag of its status
	POP_META 
endmacro

endblock

ifselect 1                      # If caps lock on ...
remapblock                      
        F9 F11                  # re-map F9  
        F10 F12                 # and F10
endblock 
 

# reset conditionals in case this file is included from another file
ifset any
ifkeyboard any
ifselect any


cloudhax

28 Dec 2018, 04:02

on my ansi-modded F 122. I am playing with some macros to make use of some of the more obscure terminal keys like 'Erase EOF', 'ExSel' and 'Cursr Sel'. What I programmed is likely not their original function but I'm just messing around and these functions are somewhat useful to me in editing text files and the like...

Code: Select all

macroblock
# macro count: 3
  macro EXTRA_F5  # Cursor Sel - 
     MAKE LSHIFT
     PRESS HOME
     BREAK LSHIFT
  endmacro
  macro EXTRA_F6  # ExSel
     MAKE LSHIFT
     PRESS END
     BREAK LSHIFT
  endmacro
  macro EXTRA_F8  # Erase EOF
     MAKE LSHIFT
     PRESS END
     PRESS DELETE
     BREAK LSHIFT
  endmacro
endblock
remapblock
layer 0
# count: 13
    EXTRA_F1 ESC
	EXTRA_F2 ESC
	EUROPE_1 ENTER
	EUROPE_2 LSHIFT
	LANG_4 DOWN
	ESC PRINTSCREEN
	NUM_LOCK PAD_SLASH
	SCROLL_LOCK PAD_ASTERIX
	EXTRA_SYSRQ PAD_MINUS
	PAD_ASTERIX PAD_PLUS
	PAD_MINUS PAD_PLUS
	PAD_PLUS PAD_ENTER
	EXTRA_F10 RGUI
endblock

User avatar
depletedvespene

06 Jan 2019, 02:39

So a while ago, I got a Model M 1391401 keyboard from ClickyKeyboards. I asked him to make a couple modifications: convert it to ISO and expand the numpad to 19 keys, by replacing both numpad0 and numpad+ with two 1U keys on each. This is how it looks like now (the new caps are Unicomp blanks - I'll put better ones later):
20190105_152116_th.jpg
Right side of the M104.
20190105_152116_th.jpg (217.01 KiB) Viewed 1184 times
And this is the diagram of the layout I wanted it to have:
pad19.png
19-key numpad.
pad19.png (21.63 KiB) Viewed 1184 times
I replaced the regular SDL cable with a SDL-to-USB Soarer's Converter, and this is the .sc file I loaded on it:

Code: Select all

# Soarer Converter's configuration for an IBM Model M P/N 1391401 keyboard,
# where the numpad has been made into into a 19-key pad (only the Enter key
# remains 2U).
#
# Author: Depleted Vespene.
# Date: 20190105.
# Version: 1.0.
#
##### BEGIN ########

macroblock

  # The MUTE function is too useful to not have readily available.
  macro CAPS_LOCK ctrl
    PUSH_META CLEAR_META ctrl
    PRESS MEDIA_MUTE
    POP_META
  endmacro

  # Num Lock needs to be available, but doesn't deserve an assignment in
  # the base layer.
  macro SCROLL_LOCK ctrl
    PUSH_META CLEAR_META ctrl
    PRESS NUM_LOCK
    POP_META
  endmacro

  # On my national layout, Shift-0 produces the '=' character. Adjust this
  # as needed for others.
  macro PAD_EQUALS
    PUSH_META CLEAR_META all
    MAKE LSHIFT
    PRESS 0
    BREAK LSHIFT
    POP_ALL_META
  endmacro

endblock


remapblock

  NUM_LOCK      PAD_EQUALS  # See above.
  PAD_COMMA     TAB         # Former lower half of the 2U numpad+ key; the upper half remains PAD_PLUS.
  EXTRA_INSERT  PAD_0       # Former LEFT  half of the 2U numpad0 key.
  PAD_0         COMMA       # Former RIGHT half of the 2U numpad0 key.

# Bonus: on my national layout, Shift-, produces the ';' character. With
# the direct remapping above, pressing Shift-(left-side)PAD_0 has the same
# effect. Replace with a macro if needed.

endblock

##### END ##########
Note how few remappings needed to be made.

Num Lock needs to be present, but I think it's wasteful to keep it in the base layer, so it goes off to Ctrl-Scroll Lock.

Bonus track: Ctrl-Caps Lock mutes and unmutes the computer's volume.

ghostdawg187

08 Feb 2019, 14:39

ghostdawg187 wrote:
19 Oct 2018, 15:23
ii.) Assume I have manged to produce a vaild .sc-file, how do I proceed further under linux, so that my remap file will be applied by the converter?
Whoever wants to work under Linux should follow the instructions provided in this post:

viewtopic.php?p=252342#p252342

While compiling I had an error, which said usb.h is missing. Then I followed the instructions from this link:

https://askubuntu.com/questions/503928/ ... o-i-get-it

jacks

19 Feb 2019, 12:26

The following worked for me on a model 1392595 terminal board.

Code: Select all

ifset set3
# Terminal Model M 1392595

remapblock

# Function row. The Escape key and the printscreen block
	F23		PRINTSCREEN    	# Printscreen 'Print'
   	F24		SCROLL_LOCK    	# Scroll lock 'Print Line'
   	LANG_4		PAUSE        	# Pause  'Hold'
	F13		ESC		# Esc Sends +68 which is F13

# 4 keys along the top of the numpad	
	ESC		NUM_LOCK	# Num lock 'Jump'				
	NUM_LOCK	PAD_SLASH	# numpad / 'Blank key'
	SCROLL_LOCK	PAD_ASTERIX	# numpad * 'Send Line'
	EXTRA_SYSRQ	PAD_EQUALS	# Extra key. Use as '='   Top-right corner, front-printed with 'Setup'
	
# The 3 buttons along the right side of the numpad
	PAD_ASTERIX	PAD_MINUS	# Minus
	PAD_MINUS 	PAD_PLUS	# Plus     Has '|_ symbols
	PAD_PLUS 	PAD_ENTER	# Numpad Enter
    
endblock
On an ubuntu based system I had to

Code: Select all

sudo apt install libusb-0.1-4:i386
in order to ensure the correct lib was installed and then run the scwr utility with sudo in order to access the converter.

kmnov2017

22 May 2019, 22:53

Here's another example for an IBM XT

remapblock

BACKSLASH EUROPE_2
BACK_QUOTE BACKSLASH
PAD_PLUS PAD_ENTER
SCROLL_LOCK DELETE
LCTRL CAPS_LOCK
CAPS_LOCK LALT
LALT RCTRL

endblock


and that produces this layout:
modifiedLayout.jpg
modifiedLayout.jpg (97.32 KiB) Viewed 725 times

User avatar
depletedvespene

22 Jul 2019, 20:29

I got one here that's a tad different from the usual.

Whenever writing source code in Java or other languages where, say, CONSTANTS_ARE_WRITTEN_IN_UPPERCASE and WITH_UNDERSCORES_AS_SEPARATORS, LIKE_IN_THESE_EXAMPLES, one usually has to either keep a Shift key constantly pressed while writing those character sequences, using the MINUS key in lieu of the space (or the SLASH key, or perhaps even another one, depending on the national layout), or press Caps Lock, type each letter out and go Shift on each underscore, and back. Not terrible, but somewhat uncomfortable.

There's got to be a (slightly) better way!

This remapping:

Code: Select all

# Soarer Converter's configuration for an IBM Model M SSK; adds volume
# control keys and CONSTANT_NAMES_MODE (which produces underscores
# instead of spaces and uppercase letters... ok, single-case letters).
#
# Author: Depleted Vespene.
# Date: 20190722.
# Version: 1.0.
#
##### BEGIN ########

macroblock

  # Caps Lock with modifiers outputs the volume control commands.

  macro CAPS_LOCK lctrl
    PRESS MEDIA_VOLUME_DOWN
  endmacro

  macro CAPS_LOCK lalt
    PRESS MEDIA_VOLUME_UP
  endmacro

  macro CAPS_LOCK shift     # Yes, both Shift keys.
    PRESS MEDIA_MUTE
  endmacro


  # Toggles CONSTANT_NAMES_MODE. Map this on EF6 as well, if available.
  macro CAPS_LOCK rctrl
    PRESS SELECT_2
  endmacro

endblock


# Layer 2 contains the mappings for the CONSTANT_NAMES_MODE. For proper
# usage, CAPS LOCK IS EXPECTED TO BE OFF (I'd kill to be able to set,
# clear, push and pop its setting here!).

ifselect 2
macroblock

  # Caps Lock by itself also turns CONSTANT_NAMES_MODE off. Convenient!
  macro CAPS_LOCK -all
    PRESS SELECT_2
  endmacro

  # One macro for each key in A-Z (and other letters, for those national
  # layouts with them); they are NOT triggered if Ctrl and/or Alt are
  # pressed. Shift may or may not be pressed, but its setting is ignored
  # during each macro's execution.

  macro A -CTRL -ALT
    PUSH_META SET_META shift
    PRESS A
    POP_META
  endmacro

  macro B -CTRL -ALT
    PUSH_META SET_META shift
    PRESS B
    POP_META
  endmacro

  macro C -CTRL -ALT
    PUSH_META SET_META shift
    PRESS C
    POP_META
  endmacro

  macro D -CTRL -ALT
    PUSH_META SET_META shift
    PRESS D
    POP_META
  endmacro

  macro E -CTRL -ALT
    PUSH_META SET_META shift
    PRESS E
    POP_META
  endmacro

  macro F -CTRL -ALT
    PUSH_META SET_META shift
    PRESS F
    POP_META
  endmacro

  macro G -CTRL -ALT
    PUSH_META SET_META shift
    PRESS G
    POP_META
  endmacro

  macro H -CTRL -ALT
    PUSH_META SET_META shift
    PRESS H
    POP_META
  endmacro

  macro I -CTRL -ALT
    PUSH_META SET_META shift
    PRESS I
    POP_META
  endmacro

  macro J -CTRL -ALT
    PUSH_META SET_META shift
    PRESS J
    POP_META
  endmacro

  macro K -CTRL -ALT
    PUSH_META SET_META shift
    PRESS K
    POP_META
  endmacro

  macro L -CTRL -ALT
    PUSH_META SET_META shift
    PRESS L
    POP_META
  endmacro

  macro M -CTRL -ALT
    PUSH_META SET_META shift
    PRESS M
    POP_META
  endmacro

  macro N -CTRL -ALT
    PUSH_META SET_META shift
    PRESS N
    POP_META
  endmacro

  macro O -CTRL -ALT
    PUSH_META SET_META shift
    PRESS O
    POP_META
  endmacro

  macro P -CTRL -ALT
    PUSH_META SET_META shift
    PRESS P
    POP_META
  endmacro

  macro Q -CTRL -ALT
    PUSH_META SET_META shift
    PRESS Q
    POP_META
  endmacro

  macro R -CTRL -ALT
    PUSH_META SET_META shift
    PRESS R
    POP_META
  endmacro

  macro S -CTRL -ALT
    PUSH_META SET_META shift
    PRESS S
    POP_META
  endmacro

  macro T -CTRL -ALT
    PUSH_META SET_META shift
    PRESS T
    POP_META
  endmacro

  macro U -CTRL -ALT
    PUSH_META SET_META shift
    PRESS U
    POP_META
  endmacro

  macro V -CTRL -ALT
    PUSH_META SET_META shift
    PRESS V
    POP_META
  endmacro

endblock

# Soarer's Converter can't handle more macros than the above in a single
# block. Fortunately, there can be more than one ifselect block for the
# same layer.

ifselect 2
macroblock

  macro W -CTRL -ALT
    PUSH_META SET_META shift
    PRESS W
    POP_META
  endmacro

  macro X -CTRL -ALT
    PUSH_META SET_META shift
    PRESS X
    POP_META
  endmacro

  macro Y -CTRL -ALT
    PUSH_META SET_META shift
    PRESS Y
    POP_META
  endmacro

  macro Z -CTRL -ALT
    PUSH_META SET_META shift
    PRESS Z
    POP_META
  endmacro

# Commented because I've chosen to "degrade" the 'Ñ' characters to 'N'.
# Uncomment this macro and comment the SEMICOLON line in the remap block
# below to treat this letter in the same way as A-Z.
#
# # SHIFT+SEMICOLON produces 'Ñ' in my national layout. Adjust as needed
# # for other national layouts.
# macro SEMICOLON -CTRL -ALT
#   PUSH_META SET_META shift
#   PRESS SEMICOLON
#   POP_META
# endmacro

endblock


ifset any

macroblock

  # SHIFT+SLASH produces '_' in my national layout.
  macro AUX1
    PUSH_META CLEAR_META all
    SET_META shift
    PRESS SLASH
    POP_META
  endmacro

endblock

remapblock

  # Fundamental remappings.
  SPACE      AUX1       # Underscore.
  TAB        SPACE      # Keep a space available if ever needed.

  # National-layout-dependent remappings.
  SEMICOLON  N          # Ñ is degraded to a plain N.
  LEFT_BRACE UNASSIGNED # Grave and circumflex accents are turned off.
  QUOTE      UNASSIGNED # Acute accent and diaeresis are turned off.

endblock

##### END ##########

Defines a mode where all letters are typed in uppercase (as long as Caps Lock is off) and the space produces an underscore. Turned on and off with RCtrl-Caps Lock (and also turned off with plain Caps Lock, for convenience).


Yes, I wish there was a slightly less clunky way of defining the same macro for a bunch of different keys (A-Z, in this case), and yes, I wish Soarer's Converter was also able to set (and unset and push and pop) the lock statuses.

User avatar
Muirium
µ

22 Jul 2019, 20:35

Ha! Thats one way to do it. Everything really has to be in CAPS? Space as underscore makes sense, and is a trivial layer select. But shifted letters are a tougher ask, as you’ve shown.

User avatar
depletedvespene

22 Jul 2019, 20:44

Muirium wrote:
22 Jul 2019, 20:35
Ha! Thats one way to do it. Everything really has to be in CAPS? Space as underscore makes sense, and is a trivial layer select. But shifted letters are a tougher ask, as you’ve shown.
In Java code, the convention is to write all constants like that, and whenever typing them out... it gets to be tiring if there are several of them. And yes, I tried several different strategies to get what I wanted, but in the end, the only one feasible with Soarer's Converter (as it stands in v1.1) is the clunky one.

I still have to combine this with the hexapad I have in the .sc file for my F122 — shouldn't be a problem to do it (as long as I don't mix up both layer selects), but I want to test it before releasing it.

Post Reply

Return to “Keyboards”