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):
Right side of the M104.
Right side of the M104.
20190105_152116_th.jpg (217.01 KiB) Viewed 10416 times
And this is the diagram of the layout I wanted it to have:
19-key numpad.
19-key numpad.
pad19.png (21.63 KiB) Viewed 10416 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 9957 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.

memm74

06 Jan 2020, 16:22

I was looking though the examples posted here in the hope I find the answer to my question, but wasn't successful.

My IBM Model M 122 has a soarer's converter. I am using a German keyboard layout, but am in the UK, so need characters like the Pound sign £ often. The keyboard is connected to a Windows 10 machine, so I tried to create a macro for ALT + 0163 which is for the Pound sign. Unfortunately this macro doesn't work. Addig delays doesn't help either. I am not sure what I am doing wrong as other macros work.

Below is an example.

Code: Select all

#Sets F13 to Pound Sign ALT + 0163
 macro F13
    PUSH_META CLEAR_META all
    #SET_META LALT #is LALT key or meta?
	MAKE LALT
    DELAY 5
	PRESS 0
	DELAY 5
	#add DELAY 1?
	PRESS 1
	DELAY 5
	PRESS 6
	DELAY 5
	PRESS 3
    BREAK LALT
    POP_ALL_META
 endmacro
 
#sets F21 to ALT PRINTSCREEN ("Druck")
 macro F21
    PUSH_META CLEAR_META all
    MAKE LALT
    PRESS PRINTSCREEN
    BREAK LALT
    POP_ALL_META
 endmacro
Can anyone tellme what I am doing wrong? Thank you for your help.

kmnov2017

06 Jan 2020, 16:57

The number needs to be the Numpad numbers (not the regular numbers).

memm74

06 Jan 2020, 17:17

Super. Thank you very much!! I think I'll do a macro for the Interrobang next 8^)

edlee

30 Apr 2020, 09:14

Here is an excerpt from my latest configuration file. Another person gave a long example of creating a SELECT configuration with a macro for each letter to capitalize every letter and replace the space character with an underline character, but there is a far more concise way to accomplish the same thing that uses less precious EEPROM memory in Soarer's converter.

Code: Select all

macroblock
  # Pressing SCROLL_LOCK by itself toggles the case of letters with the space
  # character replaced by an underline character, SUCH_AS_THIS.  This works
  # with the Colemak, Dvorak, or default keyboard layouts.  This assumes
  # that the CAPS_LOCK is not already on.  If CAPS_LOCK is on, then when
  # you toggle on SELECT_3, the letters will be in lower case and the space
  # character will be an underline, such_as_this.  If you press the Right Shift
  # key while in the SELECT_3 configuration, then the shift will be toggled off,
  # resulting in text such-as-this.  In this situation, press SCROLL_LOCK again
  # to turn the MINUS back into a SPACE and press the Right Shift key to release
  # the shift toggle.

  macro SCROLL_LOCK -shift -ctrl -alt -gui
    toggle_meta RSHIFT
    press SELECT_3
  endmacro

endblock

ifselect 3

remapblock
  SPACE MINUS
endblock
The complete configuration file is in a zip file attachment to a message that I wrote on the, "Geekhack.org", web site:

https://geekhack.org/index.php?PHPSESSI ... ach=241051

User avatar
depletedvespene

02 May 2020, 17:09

edlee wrote:
30 Apr 2020, 09:14
Here is an excerpt from my latest configuration file. Another person gave a long example of creating a SELECT configuration with a macro for each letter to capitalize every letter and replace the space character with an underline character, but there is a far more concise way to accomplish the same thing that uses less precious EEPROM memory in Soarer's converter.
toggle_meta was the first thing I used, BUT... it had the undesirable side effect of shifting every keypress; numbers were bad enough already, but being unable to type the comma without exiting the mode was a complete deal-breaker.

edlee

02 May 2020, 19:52

Using CAPS_LOCK is better, but I could not reliably use that on my original setup with the Rosewill RK-9000V2 keyboard with PS/2 cable, because pressing CAPS_LOCK, SCROLL_LOCK, or NUM_LOCK would cause all of indicator LEDs to flash and then lock up the keyboard if I started to type while the LEDs were flashing. I then got a Tripp Lite USB to PS/2 KVM converter to use in series with Soarer's PS/2 to USB converter so I can now use USB keyboards with Soarer's converter and reliably use CAPS_LOCK. An excerpt from my current configuration file is:

Code: Select all

macroblock
  # Pressing Left Ctrl - (minus) toggles the case of letters with the space
  # character replaced by an underline character, SUCH_AS_THIS.  This works 
  # with the Colemak, Dvorak, or default keyboard layouts.  This assumes
  # that the CAPS_LOCK is not already on.  If CAPS_LOCK is on, then when
  # you toggle on SELECT_3, the letters will be in lower case and the space
  # character will be an underline, such_as_this.  You can get a regular
  # space character in this mode by pressing SHIFT SPACE.

  macro MINUS LCTRL -RCTRL -shift -alt -gui
    press CAPS_LOCK
    press SELECT_3
  endmacro
endblock

# You can have macros in SELECT configurations
ifselect 3

macroblock
  macro SPACE -shift -ctrl -alt -gui
    push_meta clear_meta all
    set_meta LSHIFT
    press MINUS
    pop_all_meta
  endmacro
endblock

edlee

14 Jun 2020, 23:26

I posted my latest sample Soarer's Converter configuration file on Geekhack. I learned how to use the norestoremeta clause and how to make macros repeat with the MAKE and BREAK commands. I also learned how to use the MAKE and BREAK commands to make the CAPS LOCK key function like a layer key but with SELECT. That makes the associated macros a lot cleaner without having to define macros for unused key codes or FAKE_XX codes. This configuration file is set up so that it is almost impossible to activate by accident the SCROLL LOCK, NUM LOCK, or CAPS LOCK functions. You have to press two keys to activate each function, such as:

NUM_LOCK SCROLL_LOCK to toggle SCROLL_LOCK
SCROLL_LOCK NUM_LOCK to toggle NUM_LOCK
LSHIFT CAPS_LOCK to toggle CAPS_LOCK

I corrected the bug caused by Soarer commenting out the EXTRA_UNUSED_KEY_1 (0xB0) and EXTRA_UNUSED_KEY_2 (0xC1) codes in the, "hid_tokens.cpp", file. I then recompiled the affected scas and scdis programs. EXTRA_UNUSED_KEY_1 is also called FAKE_01. EXTRA_UNUSED_KEY_2 is also called FAKE_18.

I have also included in the ZIP file a copy of my Generate Presses code for Visual Basic in Microsoft Word to make it easier to generate PRESS commands for a string of text.

https://geekhack.org/index.php?action=d ... ach=244991

Riemann_Roch

16 Jul 2020, 20:20

I have an IBM M122. I use the Dvorak Simplified Layout, so I wanted a Dvorak layer. Then I realized that my OS is configured in Dvorak, and that I had a bigger issue with other people trying to use my computer and not being able to because they only know QWERTY than I did making a computer that was already in Dvorak (and because it's an ANSI standard, every computer has Dvorak).

So I wanted an "inverse Dvorak" layer so that I could hit a layer button and have the keyboard translate from Dvorak to QWERTY.

I'm more used to a telephone number pad than a computer number pad, so I swapped the 1-3 row with the 7-9 row on the number pad. The default 122-key setup puts the Escape key in the number pad, but I mapped the Escape key to EXTRA_F2 which is closest to where the ESC key would be on a normal keyboard. I also put the LGUI key in EXTRA_F10, which is closest to where the Super key would be on a normal keyboard.

Finally, I mapped a rough equivalent of the media keys on my laptop to the F13-F24 keys, because I'm used to this placement.

Code: Select all

# my_dvorak.sc IBM M122 adding some hacks along with
# dvorak keyboard layout as layer 1
# inverse dvorak keyboard layout as layer 2 (so QWERTY people can use my keyboard)

remapblock
        EXTRA_F2        ESC
        EXTRA_F10       LGUI
        EUROPE_2        LSHIFT
        EUROPE_1        ENTER
        LANG_4          HOME
        # Number Pad
        # Mimic standard num pad except with telephone number layout
        ESC             NUM_LOCK
        NUM_LOCK        PAD_SLASH
        SCROLL_LOCK     PAD_ASTERIX
        EXTRA_SYSRQ     PAD_EQUALS
        PAD_7           PAD_1
        PAD_8           PAD_2
        PAD_9           PAD_3
        PAD_ASTERIX     PAD_MINUS
        PAD_MINUS       PAD_PLUS
        PAD_1           PAD_7
        PAD_2           PAD_8
        PAD_3           PAD_9
        PAD_PLUS        PAD_ENTER
        # Media keys
        F13             MEDIA_MUTE
        F14             MEDIA_VOLUME_DOWN
        F15             MEDIA_VOLUME_UP
        F16             MEDIA_PREV_TRACK
        F17             MEDIA_PLAY_PAUSE
        F18             MEDIA_NEXT_TRACK
        # F19   switch screen?
        F20             SYSTEM_SLEEP
        # F21
        # F22
        F23             PRINTSCREEN
        F24             SCROLL_LOCK
endblock        

# add dvorak simplified layout to layer 1
ifselect 1
remapblock
	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
#	A		A
	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
#	M		M
	COMMA		W
	PERIOD		V
	SLASH		Z		
endblock

# add inverse dvorak to layer 2
ifselect 2
remapblock
  LEFT_BRACE    MINUS		
	RIGHT_BRACE   EQUAL		
	QUOTE   Q
	W		COMMA
	PERIOD  E
	P   R
	Y   T
	F   Y
	G   U
	C   I
	R   O
	L   P
	SLASH   LEFT_BRACE
	EQUAL   RIGHT_BRACE
#	A		A
	O   S
	E   D
	U   F
	I   G
	D   H
	H   J
	T   K
	N   L
	S   SEMICOLON
	MINUS   QUOTE	
	SEMICOLON Z
	Q   X
	J   C
	K   V
	X   B
	B   N
#	M		M
	W   COMMA
	V   PERIOD
	Z   SLASH
endblock

ifselect any
remapblock
        EXTRA_F1 SELECT_1
        EXTRA_F3 SELECT_2
endblock        

Post Reply

Return to “Keyboards”