Examples of Soarer Converter configuration files please

User avatar
urbancamo

25 Jul 2014, 11:10

Does anyone have an example of a converter configuration file that contains either selects or layers. Still trying to get my head round these options.

I have four 'spare' function keys and would like at least two to switch between two sets of layouts - specifically the home key group functionality.

I've googled and searched for this and not come up with much - maybe we could have some examples in an easily accessible place?

Cheers, Mark.

JBert

25 Jul 2014, 13:58

I have a few... Here's one where I use Win key + 1/2 to toggle different layers:

First this, it comes from Soarer's sample files and is stored in a file "colemak.sc":

Code: Select all

# colemak layout

remapblock
	D S
	E F
	F T
	G D
	I U
	J N
	K E
	L I
	N K
	O Y
	P SEMICOLON
	R P
	S R
	T G
	U L
	Y J
	SEMICOLON O
endblock
Here's my main Soarer config. Note that it has a few hacks:
-I have a select for "Colemak on Qwerty", and another select which basically keeps my cursor keys in the "non-Fn" layer. The order matters because I want the cursor keys to work when both selects are active.
-I don't use a dedicated key to switch layers, so I need to define my SELECT_x keys a few times, depending on the currently active selects.

Code: Select all

ifselect any

# "remap" caps_lock to Ctrl, press Caps lock + left Windows key to toggle caps lock instead
macroblock
    macro CAPS_LOCK -lgui
        MAKE LCTRL
      onbreak norestoremeta
        BREAK LCTRL
    endmacro

    macro CAPS_LOCK lgui
        PRESS CAPS_LOCK
    endmacro
endblock

# need to map the FN key into the base layer (0)
remapblock
  layer 0
    APP FN1
endblock

# define that FN1 accesses layer 1
layerblock
    FN1 1
endblock

# the layer itself is just some remaps tagged with the layer number
remapblock
  layer 1
    I UP
    J LEFT
    K DOWN
    L RIGHT
    U HOME
    O END
    P PAGE_UP
    SEMICOLON PAGE_DOWN
    ENTER PAD_ENTER
    BACKSPACE TAB
    TAB 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
    BACKSLASH APP
    RIGHT_BRACE INSERT
    R PAUSE # mnemonic: 'pause', on 'p' key in Colemak
    # Special numpad Fns taken from customized Poker layout
    A PAD_PLUS # mnemonic: 'add'
    D PAD_MINUS # mnemonic: 'subtract', on 's' key in Colemak
    G PAD_SLASH # mnemonic: 'divide', on 'd' key in Colemak
    F PAD_ASTERIX # mnemonic: 'times', on 't' key in Colemak
endblock

ifselect any
macroblock

    macro 1 GUI
        PRESS SELECT_1
    endmacro

    # To exit mode 1, as 1 is remapped to F1
    macro F1 GUI
        PRESS SELECT_1
    endmacro

    macro 2 GUI
        PRESS SELECT_2
    endmacro

    # To activate / disable mode 2 if mode 1 is active
    macro F2 GUI
        PRESS SELECT_2
    endmacro

endblock

# Ordering in the SC file matters here! Fn lock layer always needs to be last
# in file for the remapblock to be executed last!

# Colemak selection code in Mode 2
ifselect 2

include colemak.sc


# Nav mode - keep cursor and F keys in base layer
ifselect 1

remapblock
  layer 0
    I UP
    J LEFT
    K DOWN
    L RIGHT
    U HOME
    O END
    P PAGE_UP
    SEMICOLON PAGE_DOWN
    ENTER PAD_ENTER
    1 F1
    2 F2
    3 F3
    4 F4
    5 F5
    6 F6
    7 F7
    8 F8
    9 F9
    0 F10
    MINUS F11
    EQUAL F12
    BACKSLASH APP
    RIGHT_BRACE INSERT
    R PAUSE # mnemonic: 'pause', on 'p' key in Colemak
    # Poker has no numpad
    A PAD_PLUS # mnemonic: 'add'
    D PAD_MINUS # mnemonic: 'subtract', on 's' key in Colemak
    G PAD_SLASH # mnemonic: 'divide', on 'd' key in Colemak
    F PAD_ASTERIX # mnemonic: 'times', on 't' key in Colemak
endblock

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

User avatar
urbancamo

25 Jul 2014, 14:44

That's fantastic thanks. I should be able to fathom it out from there...

User avatar
Muirium
µ

25 Jul 2014, 17:09

Here's a couple of mine. The fairly basic one I use for the NMB RT-102 space invader keyboard, which has one extra layer and a couple of macros:

Code: Select all

###				Space Invader
###				Generic winkeyless ISO 103? key layout, on AT
  
layerblock  
# For Winkeyless AT & PS/2 keyboards  
ifset set2ext  
	fn1			1				# Seeing as I'm only assigning one function key
endblock
  
# Base layer remaps time  
remapblock  
# For Winkeyless AT & PS/2 keyboards  
ifset set2ext  
layer 0  
	CAPS_LOCK 	FN1				# The all important function key  
	LALT		LGUI  			# Mac mods
	RALT		RGUI  			# Control - Command - Space - Command - Option
	RCTRL		RALT			# The one and only Option
	PAUSE		SYSTEM_POWER	# Top right corner power key
	back_quote	europe_2		# Swapped, ISO Apple style (on US layout anyway)
	europe_2	back_quote
endblock

ifset set2ext
remapblock
layer 1
# 	HHKB Arrows
	LEFT_BRACE 	UP
	SEMICOLON 	LEFT
	SLASH 		DOWN
	QUOTE 		RIGHT
	L 			PAGE_UP
	PERIOD 		PAGE_DOWN
	K 			HOME
	COMMA 		END
	H 			PAD_ASTERIX
	J 			PAD_SLASH
	N			PAD_PLUS
	M			PAD_MINUS
	
# 	ESDF Arrows	
	E			UP
	S			LEFT
	D			DOWN
	F			RIGHT
	R			PAGE_UP
	V			PAGE_DOWN
	A			HOME
	G			END
	
# 	Media keys across the number row	
	1			F14					# Decrease Display Brightness 
	2			F15					# Increase Display Brightness
	3			F10					# Exposé: All App Windows
	4			F12					# Dashboard
	5			F11					# Exposé: Show Desktop
	6			F9					# Exposé: All Windows in All Apps
	7			MEDIA_PREV_TRACK	# iTunes / media playback controls
	8			MEDIA_PLAY_PAUSE
	9			MEDIA_NEXT_TRACK
	0			MEDIA_MUTE			# Volume controls
	MINUS		MEDIA_VOLUME_DOWN
	EQUAL		MEDIA_VOLUME_UP
	
#	Directional Number Pad Block
	pad_1		end
	pad_2		down
	pad_3		page_down
	pad_4		left
	pad_5		unassigned
	pad_6		right
	pad_7		home
	pad_8		up
	pad_9		page_up

#	ISO <> ANSI Oddities
	back_quote	back_quote		# Swapped, ISO Apple style (on US layout anyway)
	europe_2	europe_2

endblock

ifset set2ext
macroblock
	# Soarer's Double Shift Caps Lock
	macro lshift rshift
	press caps_lock
	endmacro
	
	macro rshift lshift
	press caps_lock
	endmacro

	# Control + Command + V = Jumpcut trigger, for rollover and ergonomics!
	macro v ctrl gui
	push_meta set_meta lalt
	press v
	pop_meta
	endmacro
endblock
And a more complex setup with multiple layers and more macros for my IBM XT.

Code: Select all

###				XT
###				For the original IBM PC/XT Model F

ifset set1
layerblock
	fn1 		1
	fn2 		1		# One for each hand, where available
	fn1 fn2		2		# Press them both for a hard to reach second layer
endblock

# Base layer remaps time
# need to map the FN key into the base layer (0)
remapblock
# Just for the PC/XT keyboard
ifset set1
layer 0
	LCTRL		FN1					# The all important function key
	PAD_ASTERIX FN2					# And the second one: currently the same
	PAD_PLUS 	PAD_ENTER			# Puts an enter at the far right edge
	LALT 		LGUI				# Command!
	CAPS_LOCK 	RGUI				# And again
	PAD_0 		RALT				# Option spills over onto the numpad
	PAD_PERIOD	RCTRL				# Control does too
	F9 			LCTRL				# Mirror image for left and function keys
	F10			LALT				# Completing the 6 mod set
	SCROLL_LOCK SYSTEM_POWER		# Closest I got to Eject, works nicely
	# NUM_LOCK	F13					# Inverse colours mode toggle
	PAD_1 		END					# Hijack the numpad for cursor controls
	PAD_2 		DOWN
	PAD_3 		PAGE_DOWN
	PAD_4 		LEFT
	PAD_5 		DOWN				# Impure, but practical when I forget
	PAD_6 		RIGHT
	PAD_7 		HOME
	PAD_8 		UP
	PAD_9 		PAGE_UP
	
# 	Hijack the f-keys for media controls
	F1 			F13					# Brightness
	F2 			F14
	F3 			MEDIA_VOLUME_DOWN	# Volume
	F4 			MEDIA_VOLUME_UP
	F5			F10					# MEDIA_PREV_TRACK	# Playback
	F6			F9					# MEDIA_NEXT_TRACK
	F7 			F11					# Exposé
	F8 			F12
endblock


# Primary Function Layer: HHKB + ESDF Arrows
# the layer itself is just some remaps tagged with the layer number
remapblock
# Just for the PC/XT keyboard
ifset set1
layer 1
# 	HHKB Arrows
	LEFT_BRACE 	UP
	SEMICOLON 	LEFT
	SLASH 		DOWN
	QUOTE 		RIGHT
	L 			PAGE_UP
	PERIOD 		PAGE_DOWN
	K 			HOME
	COMMA 		END
	H 			PAD_ASTERIX
	J 			PAD_SLASH
	N			PAD_PLUS
	M			PAD_MINUS
	
# 	ESDF Arrows	
	E			UP
	S			LEFT
	D			DOWN
	F			RIGHT
	R			PAGE_UP
	V			PAGE_DOWN
	A			HOME
	G			END
	
# 	Restore the Numpad	
	PAD_1		PAD_1
	PAD_2		PAD_2
	PAD_3		PAD_3
	PAD_4		PAD_4
	PAD_5		PAD_5
	PAD_6		PAD_6
	PAD_7		PAD_7
	PAD_8		PAD_8
	PAD_9		PAD_9
	PAD_PLUS	PAD_PLUS
	PAD_PERIOD	PAD_PERIOD
	PAD_0		PAD_0
	
# 	Restore the Function Keys	
	F1			F1
	F2			F2
	F3			F3
	F4			F4
	F5			F5
	F6			F6
	F7			F7
	F8			F8
	F9			F9
	F10			F10
	
# 	Media keys across the number row	
	1			F13					# Decrease Display Brightness 
	2			F14					# Increase Display Brightness
	3			F10					# Exposé: All App Windows
	4			F12					# Dashboard
	5			F11					# Exposé: Show Desktop
	6			F9					# Exposé: All Windows in All Apps
	7			MEDIA_PREV_TRACK	# iTunes / media playback controls
	8			MEDIA_PLAY_PAUSE
	9			MEDIA_NEXT_TRACK
	0			MEDIA_MUTE			# Volume controls
	MINUS		MEDIA_VOLUME_DOWN
	EQUAL		MEDIA_VOLUME_UP
	BACKSPACE	DELETE				# Delete for Backspace
	LCTRL		CAPS_LOCK			# Capslock lives, out of harm's way
	ENTER		PAD_ENTER			# Enter for Return
	ESC			EUROPE_2			# This § symbol
	BACK_QUOTE	EUROPE_2			# In both places I might look for it
endblock


# Secondry Function Layer: Live mods with number row function row
ifset set1
remapblock
layer 2
# 	Live Mod Function Row			# Leave those mods alone
	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


# Let the going get weird
# Match the PC/XT's unusual legends
# Just for the PC/XT keyboard
ifset set1
macroblock

	# Shift 2 = "
	macro 2 shift -ctrl -alt -gui
	press QUOTE
	endmacro
	
	# Shift ' = @
	macro QUOTE shift -ctrl -alt -gui
	push_meta set_meta lshift
	press 2
	pop_meta
	endmacro
	
	# Shift 3 = £
	macro 3 shift -alt
	push_meta set_meta ralt
	push_meta clear_meta shift
	press 3
	pop_meta
	pop_meta
	endmacro
	
	# Option 3 = #
	macro 3 alt -shift
	push_meta set_meta rshift
	push_meta clear_meta alt
	press 3
	pop_meta
	pop_meta
	endmacro
	
	# Shift Option + # = ±
	# Corresponding with § remap, this time with shift
	macro BACK_QUOTE shift alt -gui -ctrl
	push_meta set_meta rshift
	press EUROPE_2
	pop_meta
	endmacro
	
	# ` = #
	macro BACK_QUOTE -all
	push_meta set_meta rshift
	press 3
	pop_meta
	endmacro
	
	# Command + Escape = Command + Section break (for app window cycling)
	macro ESC gui -ctrl -shift
	press EUROPE_2
	endmacro

#	Swapped over to using USB TKL friendly F13 for inverse colours	
#	# Num Lock = Ctrl + Cmd + Opt + 8 (Negative / night colours mode)  
#	macro num_lock -shift  
#	push_meta set_meta rgui ralt rctrl  
#	press 8  
#	pop_meta  
#	endmacro  
	
#	Ditto. Now using native Shift + F13	for Isolator, too.
#	# Shift + Num Lock = Ctrl + Cmd + Opt + I (Isolator darkness mode)  
#	macro num_lock shift  
#	push_meta set_meta rgui ralt rctrl  
#	push_meta clear_meta lshift rshift  
#	press I  
#	pop_meta  
#	pop_meta  
#	endmacro  
	
	# Soarer's Double Shift Caps Lock
	macro lshift rshift
	press caps_lock
	endmacro
	
	macro rshift lshift
	press caps_lock
	endmacro
	
	# Quick Ctrl+F-keys for menu navigation
 	# Ctrl 2 = Ctrl + F2 = Enter main app menu
 	macro 2 ctrl -alt -gui -shift
 	press f2
 	endmacro

 	# Ctrl 8 = Ctrl + F8 = Enter system menus
	macro 8 ctrl -alt -gui -shift
 	press f8
 	endmacro
 	
 	# Invert Colour mode for Shift F13 negative trigger
 	macro NUM_LOCK -shift
 	push_meta set_meta rshift
 	press f13
 	pop_meta
 	endmacro
 	
 	# Isolator mode for Shift F13 negative trigger
 	macro NUM_LOCK shift
 	press f14
 	pop_meta
 	endmacro

endblock
I make these conditional on the keyboard ID or protocol, because my converter lives in an external box that I share between multiple keyboards.

User avatar
urbancamo

25 Jul 2014, 17:33

Thank you again. Am I right in thinking that a 'layer' relies on the defined function key being held down whilst other keys are pressed? For example with NMB example above, do you have to hold down CAPS_LOCK? Is this a similar mechanism to the 'Fn' key on a HHK?

If that is the case what is the mechanism I can use to remap keys based on me pressing a hotkey to change the current mapping?

Cheers, Mark.

User avatar
Muirium
µ

25 Jul 2014, 17:59

urbancamo wrote: Thank you again. Am I right in thinking that a 'layer' relies on the defined function key being held down whilst other keys are pressed? For example with NMB example above, do you have to hold down CAPS_LOCK? Is this a similar mechanism to the 'Fn' key on a HHK?
Yes. Exactly like that. Soarer's cunning enough that you can make multiple layers and reach them via combos of Fn keys if you like.
urbancamo wrote: If that is the case what is the mechanism I can use to remap keys based on me pressing a hotkey to change the current mapping?
I don't follow. Got a specific example that you want to do?

User avatar
urbancamo

25 Jul 2014, 18:13

yes - I have four keys on my keyboard labelled PF1 - PF4.
I press PF1 and release. From then on I have a standard keyboard layout.
I press PF2 and release. From then on my Home button becomes Insert, my Page Up becomes Delete, my End button becomes Previous, my Delete button becomes Ctrl-S (for example).

User avatar
Muirium
µ

25 Jul 2014, 18:22

Right, you'll need selects for that. And so far I haven't learned those. The layers I use are all strictly momentary, so you would have to hold PF1 to use its layer, and so on.

I've nagged Soarer for a "layer lock" for a while, and even LED outputs so we can put lights on the appropriate keys to show the keyboard state. He says its on the roadmap, but don't hold your breath. He'd have to redesign his code to make it work.

Selects are what we have, for now. They're not as easy to understand as layer locks, but are meant to be almost as powerful. From Soarer's docs:
Soarer_Converter_v1.10/docs/config.html wrote: ifselect

Groups of settings can be toggled by using the ifselect command and defining remaps or macros that output the SELECT_0 to SELECT_7 codes.

ifselect {<select_num> | any}

When any of the SELECT codes are output the entire config is reloaded, and the ifselect commands choose which blocks will be applied.
When the converter powers-up, all selects, except select 0, are inactive.
Multiple selects can be active at a time.
Select 0 is special - it is always active, and when SELECT_0 is output it resets all the other selects.

Blocks following ifselect <select_num>, up to the next ifselect, are applied only if the specified select is active.

Blocks following ifselect any, up to the next ifselect, are applied regardless of which selects are active.

Example:

# toggle between qwerty and colemak by pressing scroll lock

Code: Select all

ifselect 1
include colemak.sc

ifselect any
remapblock
    SCROLL_LOCK SELECT_1
endblock

User avatar
urbancamo

25 Jul 2014, 19:07

Great thanks - I had read through the earlier listings and was getting there. I think the key bit of info here is 'the entire config is reloaded' and the ifselects control which bits are actually run.

Once I get my basic remapping working I'll tackle selects.
Thanks for the help, it's been very useful.

I think you could sum up the difference as: NUM_LOCK is a SELECT, ALT is a LAYER.

ocodo

17 Jun 2016, 01:06

I just flashed a Teensy'ed Dell AT101W with Soarer's Converter and decided to build an Emacs mode for it, I have syntax highlighting but still need to figure out indentation rules. It's not ready for use yet, which is why I'm just tacking this info on the end of this post.

Happy to get feature ideas here if anyone is interested.

ocodo

17 Jun 2016, 01:23

I'll be adding snippets/live-templates with completion for a bunch of things when I'm done building the core functionality :

Which will be :
  • Syntax highlighting
  • auto-indent (includes re-indent selection etc.)
Once that's in I'll add more including:
  • completion for HID codes (this is already in)
  • auto-insert ('electric' in Emacs jargon) of

    Code: Select all

    endblock
    and

    Code: Select all

    endmacro
    when writing blocks and macros.
  • Snippet ideas are (so far) macro assist, hmm that's all I've got!
  • Auto complete for all commands/keywords.

ocodo

18 Jun 2016, 13:50

Added indenting today, and stored on github: https://github.com/ocodo/soarers-converter-mode

Syntax highlighting and indenting looks like this...

Image

User avatar
Phenix
-p

18 Jun 2016, 20:54

could someone please share an F122 firmware?

Having quite some trouble figuring it out

jeb

21 Jun 2016, 20:02

Here's my F122 config. It's not commented, and has a fair number of keys that aren't remapped to anything useful. (If anyone has an example where they've found uses for all the keys on an F122, do share.) It includes a function layer activated by hitting the key to the right of left shift, and the left hand F10 changes to Dvorak, though I don't recommend that location because I've accidentally hit that too many times unknowingly.

Code: Select all

# length: 286
# signature: S C
# version: 1 1

# block length: 10
ifset any
ifkeyboard any
ifselect any
macroblock
# macro count: 1
macro EXTRA_F10  # 00 00
	PRESS SELECT_1
endmacro
endblock

# block length: 46
ifset any
ifkeyboard any
ifselect any
remapblock
layer 0
# count: 21
	CAPS_LOCK RCTRL
	LCTRL LGUI
	EUROPE_1 BACKSLASH
	LANG_4 DOWN
	ESC NUM_LOCK
	NUM_LOCK PAD_SLASH
	SCROLL_LOCK PAD_ASTERIX
	EXTRA_SYSRQ PAD_MINUS
	PAD_ASTERIX TAB
	PAD_MINUS PAD_PLUS
	PAD_PLUS PAD_ENTER
	BACK_QUOTE ESC
	EXTRA_F1 ESC
	EXTRA_F2 BACK_QUOTE
	EXTRA_F3 LANG_1
	EXTRA_F4 LANG_2
	EXTRA_F5 PRINTSCREEN
	EXTRA_F6 LANG_4
	EXTRA_F7 SCROLL_LOCK
	#EXTRA_F8 LANG_6
	EXTRA_F9 LANG_7
endblock

# block length: 6
ifset any
ifkeyboard any
ifselect any
remapblock
layer 0
# count: 1
	EUROPE_2 FN2
endblock

# block length: 5
ifset any
ifkeyboard any
ifselect any
layerblock
# count: 1
	FN2 2
endblock

# block length: 38
ifset any
ifkeyboard any
ifselect any
remapblock
layer 2
# count: 17
	H LEFT
	J DOWN
	K UP
	L RIGHT
	P APP
	N INSERT
	X DELETE
	COMMA HOME
	PERIOD END
	I INSERT
	SEMICOLON DELETE
	U PAGE_UP
	M PAGE_DOWN
	D PAGE_DOWN
	SLASH BACKSPACE
	LEFT_BRACE AUX1
	RIGHT_BRACE AUX2
	QUOTE AUX3
endblock

# block length: 105
ifset any
ifkeyboard any
ifselect any
macroblock
layer 2
# macro count: 4
macro AUX1 # 00 00
	PUSH_META CLEAR_META all 
	PRESS LEFT_BRACE
	PRESS RIGHT_BRACE
	PRESS LEFT
	POP_ALL_META 
endmacro
macro AUX2  # 00 00
	PUSH_META CLEAR_META all
	SET_META lshift 
	PRESS LEFT_BRACE
	PRESS RIGHT_BRACE
	CLEAR_META lshift 
	PRESS LEFT
	POP_ALL_META 
endmacro
macro AUX3  # 00 00
	PUSH_META CLEAR_META all
	SET_META lshift 
	PRESS 9
	PRESS 0
	CLEAR_META lshift 
	PRESS LEFT
	POP_ALL_META 
endmacro
endblock

# block length: 70
ifset any
ifkeyboard any
ifselect 1
remapblock
layer 0
# count: 33
	MINUS LEFT_BRACE
	EQUAL RIGHT_BRACE
	Q QUOTE
	W COMMA
	E PERIOD
	R P
	T Y
	Y F
	U G
	I C
	O R
	P L
	LEFT_BRACE SLASH
	RIGHT_BRACE EQUAL
	S O
	D E
	F U
	G I
	H D
	J H
	K T
	L N
	SEMICOLON S
	QUOTE MINUS
	Z SEMICOLON
	X Q
	C J
	V K
	B X
	N B
	COMMA W
	PERIOD V
	SLASH Z
endblock

coreinsane

08 Jun 2017, 14:45

My ISO config for my Terminal Model M 1399616, hope this helps someone.

Code: Select all

ifset set3
# Terminal Model M 1399616

remapblock	
	EUROPE_2		EUROPE_2
	RIGHT_BRACE		RIGHT_BRACE 		# Should be star
	EUROPE_1		BACKSLASH 			# Should be u''
	EUROPE_2		EUROPE_2 			# Should be left angle bracket
	CAPS_LOCK		LGUI				# Caps lock to windows key
	F23				PRINTSCREEN    		# Printscreen"
   	F24				SCROLL_LOCK    		# Scroll lock
   	LANG_4			PAUSE        		# Pause
	F13				ESC					# Esc

# These are the 4 keys along the top of the numpad	
	ESC				NUM_LOCK			# Num lock				
	NUM_LOCK		MEDIA_VOLUME_DOWN	# Volume down
	SCROLL_LOCK		MEDIA_VOLUME_UP		# Volume up
	EXTRA_SYSRQ		MEDIA_MUTE			# Mute
	
# The 3 buttons along the right side
	PAD_ASTERIX		PAD_MINUS			# Minus
	PAD_MINUS 		PAD_PLUS			# Plus
	PAD_PLUS 		PAD_ENTER			# Numpad Enter
endblock
17760653_1359462984097296_1337643887_n.jpg
17760653_1359462984097296_1337643887_n.jpg (68.52 KiB) Viewed 26632 times
17806910_1359434987433429_580975657_n.jpg
17806910_1359434987433429_580975657_n.jpg (97.47 KiB) Viewed 26632 times

User avatar
depletedvespene

05 Nov 2017, 21:59

I've been fiddling around the configuration for my M122, and this what I am using:
Diagram of my remapped M122.
Diagram of my remapped M122.
M122_remapping.png (37.35 KiB) Viewed 24950 times
This is the .sc file that I used to get this:

Code: Select all

# Soarer Converter's configuration for an IBM Model M122 (1390876) keyboard.
#
# Author: Depleted Vespene.
# Date: 20171105.
# Version: 1.0.
#
##### BEGIN ########

macroblock

  # On my M122, some Alt-Ctrl-arrow combinations don't register properly.
  # I use them a lot, so I need to wade around that problem (and, as it
  # turns out, this key assignment is pretty comfortable).
  macro EXTRA_F1
    SET_META LALT RCTRL
    onbreak norestoremeta
    CLEAR_META RCTRL LALT
  endmacro

  # Diacritics galore!
  macro EXTRA_F3
    SET_META RALT LSHIFT
    onbreak norestoremeta
    CLEAR_META LSHIFT RALT
  endmacro

  # This is actually quite more convenient than what would be expected at a
  # first glance.
  macro F22
    PUSH_META CLEAR_META all
    MAKE LALT
    PRESS PRINTSCREEN
    BREAK LALT
    POP_ALL_META
  endmacro

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

endblock


remapblock

# Left-side function keys.
# EXTRA_F1      (see macro above)
  EXTRA_F2      ESC
# EXTRA_F3      (see macro above)
  EXTRA_F4      RALT
  EXTRA_F5      UNASSIGNED
  EXTRA_F6      UNASSIGNED
  EXTRA_F7      UNASSIGNED
  EXTRA_F8      UNASSIGNED
  EXTRA_F9      LGUI
  EXTRA_F10     APP

# Main alphanumeric block. This remapping is non-negotiable.
  EUROPE_1    BACKSLASH

# Top-side extra function keys.
  F13           MEDIA_MUTE
  F14           MEDIA_VOLUME_DOWN
  F15           MEDIA_VOLUME_UP
  F16           SELECT_1
  F17           MEDIA_PLAY_PAUSE
  F18           MEDIA_PREV_TRACK
  F19           MEDIA_NEXT_TRACK
  F20           MEDIA_STOP
  F21           NUM_LOCK
# F22           (see macro above)
  F23           PRINTSCREEN
  F24           PAUSE

# Navigation cluster; only the "Rule" key needs to be reassigned.
  LANG_4        SCROLL_LOCK

  # The numpad's gray keys are made to behave as normal in the default
  # layer (except what would be NumLock). The extra key becomes a comma.
  ESC           PAD_EQUALS
  NUM_LOCK      PAD_SLASH
  SCROLL_LOCK   PAD_ASTERIX
  EXTRA_SYSRQ   PAD_MINUS
  PAD_ASTERIX   PAD_PLUS
  PAD_MINUS     COMMA       # PAD_COMMA doesn't cut it.
  PAD_PLUS      PAD_ENTER

endblock


# Layer 1 changes the numpad into a hexpad (0..9, A..F and ':').

ifselect 1
macroblock

  # On my national layout, Shift-. outputs the ':' character. Adjust this
  # as needed.
  macro PAD_PERIOD
    PUSH_META CLEAR_META all
    MAKE LSHIFT
    PRESS PERIOD
    BREAK LSHIFT
    POP_ALL_META
  endmacro

endblock

remapblock
  ESC           A
  NUM_LOCK      B
  SCROLL_LOCK   C
  EXTRA_SYSRQ   D
  PAD_ASTERIX   E
  PAD_MINUS     F
  PAD_PLUS      PAD_ENTER
# PAD_PERIOD    (see macro above)
endblock

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

The keys in red are those that I've moved around; green keys are for new assignments (whether made through simple remappings or macros); media keys are in purple; Cmd16 activates or deactivates the hexpad (as defined in layer 1). I still have four left-side function keys unused.

User avatar
fohat
Elder Messenger

05 Nov 2017, 22:57

#F-122 re-map 2015 v112 revision

remapblock
F13 ESC
F14 MEDIA_CALCULATOR
F15 NUM_LOCK
F20 PRINTSCREEN
F21 MEDIA_PLAY_PAUSE
F22 MEDIA_VOLUME_DOWN
F23 MEDIA_VOLUME_UP
F24 MEDIA_MUTE
EXTRA_F1 F1
EXTRA_F2 F2
EXTRA_F3 F3
EXTRA_F4 F4
EXTRA_F5 F5
EXTRA_F6 F6
EXTRA_F7 F7
EXTRA_F8 F8
EXTRA_F9 F9
EXTRA_F10 LGUI
NUM_LOCK PAD_SLASH
PAD_ASTERIX PAD_PLUS
SCROLL_LOCK PAD_ASTERIX
EXTRA_SYSRQ PAD_MINUS
PAD_MINUS PAD_PLUS
PAD_PLUS PAD_ENTER
LANG_4 DOWN
endblock

User avatar
Myoth

05 Nov 2017, 23:06

I need help with mine, I'm using an F XT and it didn't really worked. I managed to change the pipe key to be next to the enter key, but changing the used-to-be backslash to be the extra ISO key. Here's my .sc :

Code: Select all

remapblock
   BACK_QUOTE BACKSLASH
   BACKSLASH EUROPE_1
   
endblock
BTW I'm trying to make my F XT fully ISO, meaning that the tilde will be deleted for the backslash key and the backslash key will be replaced by the extra ISO key, but it's not working out. I just end with the extra ISO key not inputting anything..

I don't see what's wrong ? Could you help me ?

User avatar
depletedvespene

05 Nov 2017, 23:31

Assuming the key *does* work on a hardware level, what does hid_listen output when you type it?

User avatar
Myoth

05 Nov 2017, 23:46

depletedvespene wrote: Assuming the key *does* work on a hardware level, what does hid_listen output when you type it?
I'll check tomorrow as I'm going to sleep but it inputs x031 I think.

User avatar
Myoth

06 Nov 2017, 17:59

With no remapping active, this is what it gives me. The first input is the key next to neter and the second is the key next to the lshift.

Image

I tapped them twice as you can see and given the codes.html, the code I put should work right ? Maybe it's not working because I'm overlaping BACKSLASH ?

User avatar
depletedvespene

07 Nov 2017, 00:16

I don't have an F XT at hand to test out my theory, BUT I think I know what the problem may be. Assuming that you're using, on Windows, the US English national layout, the BACKSLASH key (remapped to EUROPE_1) doesn't produce anything because that national layout does not assign anything to that key. Load up any other national layout and see if those produce anything.

Alternatively, load this code into the converter:

Code: Select all

remapblock
   BACK_QUOTE BACKSLASH
   BACKSLASH C
endblock
and see if typing the backslash key produces a C. If so, there's your problem.

Worst case scenario, you could define a macro to produce your desired output. In my M122 .sc (see my post above), I remap the Esc key (which is in the position of the Num Lock in a regular, full-sized keyboard) to PAD_EQUALS, but... since Windows' layouts don't assign anything to that key (as PAD_EQUALS doesn't exist in normal PC keyboards), I redefined it with a macro to produce an '=' character by "pressing" Shift-0.


HTH!

User avatar
Myoth

08 Nov 2017, 12:54

I'm using the French ISO layout, so a key should be here. I tried what you said and it remaps the key to C as expected. US layout gives me a c, aswell as french ISO and UK ISO. I don't really see why it's doing that.


I will try to make a macro, it could fix it, but I don't know how well.

Thanks for the help !

User avatar
depletedvespene

15 Nov 2017, 02:59

EDIT: See below for version 1.2 of this remapping file.

Further refinements to my previous SC file yield this remapping, which I'm now using on both the M122 and the F122:
Diagram of my remapped M122 and F122, v1.1
Diagram of my remapped M122 and F122, v1.1
F122_remapping.png (38.81 KiB) Viewed 24834 times
This is the (v1.1 of the) .sc file that I used to get this:

Code: Select all

# Soarer Converter's configuration for an IBM Model M122 (1390876) keyboard
# and an F122 (6110345) as well.
#
# Author: Depleted Vespene.
# Date: 20171110.
# Version: 1.1.
#
##### BEGIN ########

macroblock

  # Right to the left of TAB.
  macro EXTRA_F4
    PUSH_META CLEAR_META all
    MAKE LSHIFT
    PRESS TAB
    BREAK LSHIFT
    POP_ALL_META
  endmacro

  # Diacritics galore!
  macro EXTRA_F5
    SET_META RALT LSHIFT
    onbreak norestoremeta
    CLEAR_META LSHIFT RALT
  endmacro

  # On my M122 (but NOT on the F122), some Alt-Ctrl-arrow combinations
  # don't register properly. I use them a lot, so I need to wade around
  # that problem (and, as it turns out, this key assignment is pretty
  # comfortable).
  macro EXTRA_F10
    SET_META LALT RCTRL
    onbreak norestoremeta
    CLEAR_META RCTRL LALT
  endmacro

  # This is actually quite more convenient than what would be expected at a
  # first glance.
  macro F22
    PUSH_META CLEAR_META all
    MAKE LALT
    PRESS PRINTSCREEN
    BREAK LALT
    POP_ALL_META
  endmacro

  # On my national layout, Shift-0 outputs 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

# Left-side function keys.
  EXTRA_F1      LGUI
  EXTRA_F2      ESC
  EXTRA_F3      APP
# EXTRA_F4      (see macro above)
# EXTRA_F5      (see macro above)
  EXTRA_F6      RALT
  EXTRA_F7      UNASSIGNED          # Future "Layer n".
  EXTRA_F8      UNASSIGNED          # Future "Layer 0".
  EXTRA_F9      UNASSIGNED          # Keep unassigned until I stop hitting it accidentally!
# EXTRA_F10     (see macro above)

# Main alphanumeric block. This remapping is non-negotiable.
  EUROPE_1    BACKSLASH

# Top-side extra function keys.
  F13           MEDIA_MUTE
  F14           MEDIA_VOLUME_DOWN
  F15           MEDIA_VOLUME_UP
  F16           SELECT_1
  F17           MEDIA_PLAY_PAUSE
  F18           MEDIA_PREV_TRACK
  F19           MEDIA_NEXT_TRACK
  F20           MEDIA_STOP
  F21           NUM_LOCK
# F22           (see macro above)
  F23           PRINTSCREEN
  F24           PAUSE

# Navigation cluster; only the "Rule" key needs to be reassigned.
  LANG_4        SCROLL_LOCK

  # The numpad's gray keys are made to behave as normal in the default
  # layer (except what would be NumLock). The extra key becomes a comma.
  ESC           PAD_EQUALS
  NUM_LOCK      PAD_SLASH
  SCROLL_LOCK   PAD_ASTERIX
  EXTRA_SYSRQ   PAD_MINUS
  PAD_ASTERIX   PAD_PLUS
  PAD_MINUS     COMMA       # This way, I get ";" with Shift-PAD_MINUS.
  PAD_PLUS      PAD_ENTER

endblock


# Layer 1 changes the numpad into a hexpad (0..9, A..F and ':').

ifselect 1
macroblock

  # On my national layout, Shift-. outputs the ':' character. Adjust this
  # as needed.
  macro PAD_PERIOD
    PUSH_META CLEAR_META all
    MAKE LSHIFT
    PRESS PERIOD
    BREAK LSHIFT
    POP_ALL_META
  endmacro

endblock

remapblock
  ESC           A
  NUM_LOCK      B
  SCROLL_LOCK   C
  EXTRA_SYSRQ   D
  PAD_ASTERIX   E
  PAD_MINUS     F
  PAD_PLUS      PAD_ENTER
# PAD_PERIOD    (see macro above)
endblock

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

Later on, when I decide on other uses for the numpad, I'll make LHS EXTRA_F7 become Layer Select N, and EXTRA_F8 shall be Layer Select 0. I may or may not keep current Cmd16/F16 as Layer Select 1 (which activates the hexpad).
Last edited by depletedvespene on 11 Oct 2018, 01:24, edited 1 time in total.

User avatar
depletedvespene

19 Nov 2017, 00:06

Basic remapping of an IBM Model F XT layout for usage with a modern ISO-based national layout.

The Model F XT layout looks like this:
Plain vanilla Model F XT layout.
Plain vanilla Model F XT layout.
FXT_layout.png (23.51 KiB) Viewed 24804 times
If one should want to use this keyboard with an ISO-based national layout on top of it, some adjustments will be needed. The first, and more obvious, is to get an AltGr key; some of the keys need to moved around as well (it's not immediately apparent, but the \| key is not actually the BACKSLASH key and the `~ key is not BACKQUOTE).

This remapping for the Soarer's Converter:

Code: Select all

# Soarer Converter's configuration for an IBM Model F XT keyboard.
#
# Author: Depleted Vespene.
# Date: 20171118.
# Version: 1.0.
#
##### BEGIN ########

macroblock

  # Ctrl-Scroll Lock is now Caps Lock.
  macro SCROLL_LOCK CTRL
    PUSH_META CLEAR_META CTRL
    PRESS CAPS_LOCK
    POP_META
  endmacro

endblock


remapblock
  # ESC stays put. No remapping is defined for it.

  # On the F XT, BACKSLASH is the key between LSHIFT and Z (on M units,
  # EUROPE_2 is in that position).
  BACKSLASH     EUROPE_2

  # On the F XT, BACK_QUOTE is the key between '/" and the lower half of
  # ENTER (on M units, BACKSLASH is in that position, while BACK_QUOTE is
  # located to the left of 1).
  BACK_QUOTE    BACKSLASH

  # This remaps the */PrtSc key to be BACK_QUOTE, which would otherwise be
  # missing. In the French AZERTY layout, lacking it means losing access
  # only to the '²' character (not much of a problem), but in other
  # national layouts, it creates more serious losses ('|', '°' and '¬' in
  # Spanish (Latin America), '`' and '~' in US English, etcetera).
  PAD_ASTERIX   BACK_QUOTE

  # Caps Lock is now AltGr.
  CAPS_LOCK     RALT

endblock

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

produces THIS layout:
Model F XT layout for (ISO) UK English.
Model F XT layout for (ISO) UK English.
FXT_layout_remapped.png (24.69 KiB) Viewed 24804 times
The changes are these:
  • Caps Lock is now AltGr.
  • Ctrl-Scroll Lock is now Caps Lock.
  • The two keys in green are remapped so they'll output what they are expected to output by the national layout definition.
  • The (modern) BACKQUOTE key doesn't exist in this keyboard, so */PrtSc (in blue) is mapped to it.

Further changes can be defined afterwards at the user's discretion, but this remapping defines a usable starting point.

User avatar
depletedvespene

11 Oct 2018, 01:22

This is version 1.2 of the .sc remapping file for M122 and F122 keyboards. It corrects the mapping for EF4 (made to be Shift-Tab), which was improperly done, has EF9 output an enlightened advice (for demo purposes) and improves a bit the comments. Use this version instead of either 1.1 or 1.0 and adjust as needed.

Code: Select all

# Soarer Converter's configuration for IBM Model M122 (1390876, etc.) and
# F122 (6110345, etc.) keyboards.
#
# Author: Depleted Vespene.
# Date: 20181010.
# Version: 1.2.
#
##### BEGIN ########

macroblock

  # Backtab (Shift-Tab, actually) - right to the left of Tab.
  macro EXTRA_F4
    PUSH_META SET_META LSHIFT
    PRESS TAB
    POP_ALL_META
  endmacro

  # AltGr-Shift - for diacritics galore!
  macro EXTRA_F5
    SET_META RALT LSHIFT
    onbreak norestoremeta
    CLEAR_META LSHIFT RALT
  endmacro

  # This shows how to assign an entire phrase to a single keystroke. Do
  # take into account that the entire macro cannot exceed a certain length.
  macro EXTRA_F9
    PUSH_META CLEAR_META all
    MAKE LSHIFT
    PRESS T
    BREAK LSHIFT
    delay 5
    PRESS H
    PRESS E
    PRESS SPACE
    delay 5
    MAKE LSHIFT
    PRESS I
    BREAK LSHIFT
    delay 5
    PRESS N
    PRESS S
    PRESS E
    delay 5
    PRESS R
    PRESS T
    PRESS SPACE
    delay 5
    PRESS K
    PRESS E
    PRESS Y
    delay 5
    PRESS SPACE
    PRESS I
    PRESS S
    delay 5
    PRESS SPACE
    PRESS G
    PRESS R
    PRESS E
    delay 5
    PRESS A
    delay 5
    PRESS T
    PRESS PERIOD
    PRESS SPACE
    delay 5
    MAKE LSHIFT
    PRESS U
    BREAK LSHIFT
    PRESS S
    PRESS E
    delay 5
    PRESS SPACE
    PRESS I
    PRESS T
    delay 5
    MAKE LSHIFT
    PRESS 1
    BREAK LSHIFT
    PRESS ENTER
    POP_ALL_META
  endmacro

  # On my M122 (but NOT on the F122), some Alt-Ctrl-arrow combinations
  # don't register as would be expected. I use them a lot, so I need to
  # wade around that problem... and, as it turns out, this key assignment
  # is pretty comfortable for other things as well.
  macro EXTRA_F10
    SET_META LALT RCTRL
    onbreak norestoremeta
    CLEAR_META RCTRL LALT
  endmacro

  # Alt-PrtScr in a single keystroke - this is actually quite more
  # convenient than what would be expected at a first glance.
  macro F22
    PUSH_META CLEAR_META all
    MAKE LALT
    PRESS PRINTSCREEN
    BREAK LALT
    POP_ALL_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

# Left-side function keys.
  EXTRA_F1      LGUI                # "Windows" key.
  EXTRA_F2      ESC
  EXTRA_F3      APP                 # "Menu" key.
# EXTRA_F4      (see macro above)
# EXTRA_F5      (see macro above)
  EXTRA_F6      RALT
  EXTRA_F7      UNASSIGNED          # Future "layer n".
  EXTRA_F8      UNASSIGNED          # Future "layer 0".
# EXTRA_F9      (see macro above)
# EXTRA_F10     (see macro above)

# Main alphanumeric block. This remapping is non-negotiable.
  EUROPE_1      BACKSLASH

# Top-side extra function keys.
  F13           MEDIA_MUTE
  F14           MEDIA_VOLUME_DOWN
  F15           MEDIA_VOLUME_UP
  F16           SELECT_1            # Toggles layer 1 (see below).
  F17           MEDIA_PLAY_PAUSE
  F18           MEDIA_PREV_TRACK
  F19           MEDIA_NEXT_TRACK
  F20           MEDIA_STOP
  F21           NUM_LOCK
# F22           (see macro above)
  F23           PRINTSCREEN
  F24           PAUSE

# Navigation cluster; only the "Rule" key needs to be reassigned.
  LANG_4        SCROLL_LOCK

# Numpad. In the default layer, the gray keys are made to behave as they do
# in a regular full-sized keyboard, EXCEPT: a) the top left key outputs the
# equals sign instead of becoming the NumLock key; b) battleships have two
# 1U keys instead of a single 2U plus key - of those, the top one remains
# plus and the bottom key outputs a comma.
  ESC           PAD_EQUALS
  NUM_LOCK      PAD_SLASH
  SCROLL_LOCK   PAD_ASTERIX
  EXTRA_SYSRQ   PAD_MINUS
  PAD_ASTERIX   PAD_PLUS
  PAD_MINUS     COMMA
  PAD_PLUS      PAD_ENTER
# Bonus: on my national layout, Shift-, produces the ';' character. With
# the direct remapping above (instead of a macro), pressing Shift-PAD_MINUS
# has the same effect. Replace with a macro if needed.

endblock


# Layer 1 changes the numpad into a hexpad (0..9, A..F, Enter and colon).

ifselect 1
macroblock

  # On my national layout, Shift-. produces the ':' character. Adjust this
  # as needed.
  macro PAD_PERIOD
    PUSH_META CLEAR_META all
    MAKE LSHIFT
    PRESS PERIOD
    BREAK LSHIFT
    POP_ALL_META
  endmacro

endblock

remapblock
  ESC           A
  NUM_LOCK      B
  SCROLL_LOCK   C
  EXTRA_SYSRQ   D
  PAD_ASTERIX   E
  PAD_MINUS     F
  PAD_PLUS      PAD_ENTER
# PAD_PERIOD    (see macro above)
endblock

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


ghostdawg187

12 Oct 2018, 19:57

I have a total noob question: I already own an IBM Model F XT and I am awaiting an converter from tinkerboy. In preparation I want to understand how to proceed further, after the converter has arrived. Assuming I have cleaned the board and ensured that the board is in a usable status, how do I setup the converter from tinkerboy?

I have googled around and found this tutorial:

https://www.keebtalk.com/t/help-with-so ... ing/2548/3

Does this tutorial also apply for the above mentioned converter or does there any tutorial exist for setting up the (tinkerboy) converter and its software? Do I need windows for this kind of stuff???

Many thanks in advance for kind assistance :)

User avatar
Muirium
µ

12 Oct 2018, 20:02

Soarer's converter is cross platform across Windows, Linux and the Mac. (I even compiled a PowerPC version for my G5.) Check out his instructions in the download, here:

workshop-f7/xt-at-ps2-terminal-to-usb-c ... t2510.html

ghostdawg187

19 Oct 2018, 15:23

Ok, I am trying to build my own remapping file under Linux (Ubuntu 18.04) and use it for tinkerboy's converter but I fail to find any good instructions how to behave under Linux. I only find some tutorials for windows like this one here:

https://www.reddit.com/r/MechanicalKeyb ... ng_teensy/

i.) Which alternative can I use for hid_listen.exe under linux?
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?

orihalcon

19 Oct 2018, 15:44

My suggestion would be to do the configuration in Windows just because of ease of use and then just use the keyboard with Linux after since the configuration is stored within the converter, so it's not like you actually need those utilities for anything other than to do the configuration. Probably not ideal if you plan to change your configuration all the time, but perfectly fine if you already know what you want.

Post Reply

Return to “Keyboards”