• You are not logged in.

DreymaR's Big Bag of Keyboard Tricks (Linux/XKB files included)!

  • Started byDreymaR
  • 356Replies:
  • Reputation: 0
  • Registered:06-Oct-2020
  • Posts:4

I'm a long time Colemak user that accidentally stumbled into the dh/extend/wide rabbit hole whilst trying to find Colemak friendly vim setups.

After a test drive, I was very impressed with what they offer over vanilla Colemak, so I've been trying/failing to make them a permanent part of my setup ever since. 

Desired mods:

-PC105-Curl(DH)AngleWide
-local variants: gb, es
-Extends, ralt_switch_lock

System:
Ubuntu 20.04 LTS
Keyboard: ISO/pc105

What I've done so far:

Followed this guide to the letter:

Point-by-point example: System install for Debian/Ubuntu and many other distros:

1. Download/unzip/clone the BigBagKbdTrixXKB dir to, say, your home desktop (~/Desktop)
2. Open a terminal window and go there, e.g.: cd ~/Desktop/BigBagKbdTrixXKB
3. To install/activate: sudo bash ./install-dreymar-xmod.sh -ox
4. See XKB Configuration step below and edit /etc/default/keyboard to make startup changes persistent
5. Reboot the system (to be on the safe side; may not be necessary)
6. Select your layout such as English(Colemak[Ed], Curl-DH ergo) from dropdown top-right menu (Ubuntu) or settings → keyboard

Used

sudo nano /etc/default/keyboard

and

sudo gedit /etc/default/keyboard

to update the config.   The changes persist in the config file on reboot but have no effect on the active layout. 

Ran this setxkbmap command, which initially activated the mods, now it produces no change in the active layout (see error message below)

setxkbmap -model pc105awide-sl -layout gb,es -variant cmk_ed_us,cmk_ed_us -option lv5:ralt_switch_lock,misc:extend -v 9

Gives me the following:

More than one keyboard model on command line
Using "pc105awide-sl", ignoring "pc105awide-sl"
More than one keyboard layout on command line
Using "gb,es", ignoring "gb,es"
More than one layout variant on command line
Using "cmk_ed_us,cmk_ed_us", ignoring "cmk_ed_us,cmk_ed_us"
Setting verbose level to 9
locale is C
Warning! Multiple definitions of keyboard model
         Using command line, ignoring X server
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Warning! Multiple definitions of layout variant
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105awide-sl
layout:     gb,es
variant:    cmk_ed_us,cmk_ed_us
options:    setxkbmap,lv5:ralt_switch_lock,misc:extend,lv5:lalt_switch_lock,misc:extend

Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+gb(cmk_ed_us)+es(cmk_ed_us):2+inet(evdev)+level5(ralt_switch_lock)+extend(basic):1+extend(basic):2
geometry:   pc(pc104)

Ran this command from /BigBagKbdTrixXKB-master

./setxkb.sh -a 5cw gb es

Produces "command not found"

Excuse the long winded first post, but thank you for taking the time to have a look.

Last edited byprimetime (06-Oct-2020 19:47:12)
Offline
  • 0
  • Reputation: 139
  • From:Oslo, Norway
  • Registered:13-Dec-2006
  • Posts:4,924

Welcome! Sorry if it's a mess, one problem is that different distros have different strokes. So yes, unfortunately the /etc/default/ stuff doesn't always work anymore.

Your setxkbmap command looks fine, except you need to use quotes around "gb,es" and all the other option strings I think. That's what those "more than one" warnings are about. Why the geometry is wrong is beyond me.

The setxkb.sh command also looks okay, so it puzzles me that you'd get a "command not found" from it. Did you make sure with a 'ls' that you were in the right place? The reason I have that ./ in the start of it is to make sure it's interpreted as a command, you could also try 'bash setxkb.sh <args>'.

Wait... that setxkb.sh command is patently not okay. You've told it to run the "es" variant of the "gb" layout which doesn't exist. I don't remember if that script handles multiple layouts, but try it with "gb,es" "us,us" and see if it works. I don't think it will but you might be lucky. If not, you have to use your own setxkbmap command.

The way I prefer to set a layout is to run the setxkb script to produce a command line in ~/.bashrc so the layout gets activated on each startup. If your system doesn't use .bashrc, use another sourced file; the most logical one would be ~/.xprofile if your system uses it.

Best of luck! I'm sure you can make it work soon.  ( のvの) c[_]

Last edited byDreymaR (07-Oct-2020 12:29:26)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 1
  • Reputation: 0
  • Registered:06-Oct-2020
  • Posts:4

Thanks for the tips, I just might be getting somewhere,

So, I ran the following without language options to be on the safe side

 bash ./setxkb.sh -a 5cw

Appending bash, allowed the command to run successfully.

New issues
On reboot the active layout remains unchanged (vanilla colemak), when I type in the terminal or text editor.  However, once I start typing in firefox url/search bar the layout becomes 5cw with extend (caps lock) system wide.

Launching a terminal gives me:

Error loading new keyboard description
Error loading new keyboard description
Error loading new keyboard description

 

If your system doesn't use .bashrc, use another sourced file; the most logical one would be ~/.xprofile if your system uses it.

  My system is a fresh ubuntu install, from what I’ve gathered online it uses bashrc. Is there a simple way to confirm this?

I’ve attached a pic of my layout, in case it happens to be something other than pc104/105.  It has a few quirks, like the ’pipe + backslash’ next to the ’left shift’,

qw6dTzu.jpg

Last edited byprimetime (08-Oct-2020 02:18:45)
Offline
  • 0
  • Reputation: 139
  • From:Oslo, Norway
  • Registered:13-Dec-2006
  • Posts:4,924

In your terminal, try a 'setxkbmap -v 9' command if you can, to see what it's trying to do. And check your .bashrc to see what the command at the end is.

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 1
  • Reputation: 0
  • Registered:06-Oct-2020
  • Posts:4

setxkbmap -v 9

Setting verbose level to 9
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,us
variant:    cmk_ed_dh,
options:    lv5:lalt_switch_lock,misc:extend

Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us(cmk_ed_dh)+us:2+inet(evdev)
geometry:   pc(pc105)

The active layout was qwerty on startup this morning.

bottom of bashrc

There are 9 lots of these DreymaR's SetXKB.sh settings, for brevity I only included the first two.

##-> DreymaR's SetXKB.sh: Activate layout
setxkbmap -model 'pc105caw-sl' -layout 'gb(cmk_ed_es)' -option 'misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh'
##<- DreymaR's SetXKB.sh

##-> DreymaR's SetXKB.sh: Activate layout
setxkbmap -model 'pc105caw-sl' -layout 'gb(cmk_ed_es)' -option 'misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh'
##<- DreymaR's SetXKB.sh


All your layouts were missing from ubuntu ’Region & Languages‘, so I ran

./install-dreymar-xmod.sh -r 1

followed by:

bash install-dreymar-xmod.sh -ox

which returned them.

The persistent error in terminal is now:

Illegal map name '(cmk_ed_lv5:ralt_switch_lock+misc:extend):' in symbols name 'pc+-option(cmk_ed_lv5:ralt_switch_lock+misc:extend):2+inet(evdev)+group(shifts_toggle)+compose(menu)+level5(caps_switch_lock)+extend(basic):1+colemak(cmk_ed_dh):1+extend(basic):2'

I deleted the surplus settings in bashrc and left

##-> DreymaR's SetXKB.sh: Activate layout
setxkbmap -model 'pc105caw-sl' -layout '-option(cmk_ed_lv5:ralt_switch_lock,misc:extend)' -option 'misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh'
##<- DreymaR's SetXKB.sh

Colemak [eD], curl DH is the active layout.

Thanks

Last edited byprimetime (09-Oct-2020 16:50:02)
Offline
  • 0
  • Reputation: 139
  • From:Oslo, Norway
  • Registered:13-Dec-2006
  • Posts:4,924

Yeah, I see you'd run the script many times so you had multiple lines in your .bashrc – that would give you errors. Now you've deleted wrongly, take that last one away and either run the script again or use one of the lines you have under "the first two" above.  (✿◠‿◠)

*** Learn Colemak in 2–5 steps with Tarmak! ***
*** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

Offline
  • 1
  • Reputation: 0
  • Registered:06-Oct-2020
  • Posts:4

I followed the instructions and managed to get 5cw to persist on reboot but not extend.  My keyboard tinkering credits are maxed out, so I'll have to call it day on this for the moment but I'll keep an eye on the repo for updates and/or look into kmonad. Anyway, thanks for the responsive support.

Offline
  • 0