• You are not logged in.

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

  • Started by DreymaR
  • 266 Replies:
  • Reputation: 12
  • Registered: 01-Apr-2018
  • Posts: 115

I wouldn't overcomplicate it if you can avoid that. You can always do some Hebrew letter substitutions in DreymaR's layout if you find that you need those characters more often than the ones that he set up. That way you would only have to deal with two, the custom layout, and QWERTY for others. Though you could simplify that even further and just let those plebeians suffer for their insistence on using such a lousy old layout. Then you only need one. :P

And where are my manners? I owe you a שלום. :)

Offline
  • 0
  • Reputation: 0
  • Registered: 18-May-2018
  • Posts: 5

Thanks azuvix - I just finished setting up a xubuntu 18.04 virtual machine to play with layouts, and also to experiment with storing my config files (dotfiles as they usually referred to as they begin with .something) in github for easy sync across machines and OS installs.

Offline
  • 0
  • Reputation: 20
  • Registered: 08-Oct-2017
  • Posts: 223
IvanS said:

Thanks azuvix - I just finished setting up a xubuntu 18.04 virtual machine to play with layouts, and also to experiment with storing my config files (dotfiles as they usually referred to as they begin with .something) in github for easy sync across machines and OS installs.

I prefer dots myself ;)

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Having multiple layouts with the Big Bag active is no problem. The only hurdle is if you're using keyboard models for ergo mods, then you'll have to make sure you switch those as well. But it's easily scriptable. Also, some functionality is buggy for the non-first layouts; this is an inherent XKB weakness. Not sure exactly what it entails.

I believe I have given examples of having multiple layouts active?

The Hebrew Colemak[eD] layout is still Work In Progress. We had some good collaboration on it but then my collaborator fell silent. I'd like to get it finished!

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

Offline
  • 0
  • Reputation: 0
  • Registered: 18-May-2018
  • Posts: 5

I almost never need to type hebrew, so that's a non issue for me (but I still want to be able to go back to "stock" when other family members want to use the laptop).
But if you need to do some testing - I'll be glad to help.

Now I have an interesting problem which couldn't resolve for several hours trying:
Lenovo Ideapad 510, I've installed the Big Bag successfully, but whenever I activate it with setxkbmap - I get 3 keys which fail to type uppercase ('Q','T/G', and '{'), this is both on qwerty and colemak layout.
When I launch and press those with Shift depressed, instead of normal key event I get something like this:

>xev -event keyboard
KeymapNotify event, serial 40, synthetic NO, window 0x0,
keys:  0   0   0   0   0   10   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 

This happens on every run of setxkbmap, with any combination of options. And stays that way until I log-out and login.
OS is Linux Mint 18 x64 with XFCE DE.

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

That's really really strange. I have no explanation for it. And those keys seem quite unrelated.

Could there be some sort of hotkey settings that interfere? But then why would they interfere only when setxkbmap has been run? Oddness.

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

Offline
  • 0
  • Reputation: 0
  • Registered: 17-Oct-2018
  • Posts: 2

Hello everyone,

First of all, I would like to thank DreymaR for his amazing contributions!
I have been using the colemak_ed version on Windows for a while now, the Extend layer is amazing.

I wanted to use it on Linux as well, with the following command:

setxkbmap -model pc105awide-sl -layout us -variant cmk_ed_us -option lv5:lalt_switch,misc:extend

But unfortunately, the Alt key doesn't work as a modifier for Extend. I have tried with CapsLock or RAlt as modifier, it works well. With Alt, it still operates as a classic Alt key (i.e. opening menus). Does anyone know what could be the issue?

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505
lv5:lsgt_switch_lock            =       +level5(lsgt_switch_lock)
lv5:ralt_switch_lock            =       +level5(ralt_switch_lock)
lv5:lwin_switch_lock            =       +level5(lwin_switch_lock)
lv5:rwin_switch_lock            =       +level5(rwin_switch_lock)
lv5:caps_switch_lock            =       +level5(caps_switch_lock)
lv5:lctl_switch_lock = +level5(lctl_switch_lock)

These are the switch rules defined in xkb/rules/evdev and that's what you have to choose between by way of lv5 switches from the GUI menu I think. In xkb/symbols/level5 you see some more that could be included in the options component. But as you can see, there's no rule for LAlt. So you can't get that without making one. And that's a bit technical.

You could, however, do a low-down dirty hack by piggybacking on an existing switch! Find the code in xkb/symbols/level5 that goes:

// The CapsLock key (while pressed) chooses the fifth shift level.
partial modifier_keys
xkb_symbols "caps_switch" {
  key <CAPS> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level5_Shift ]
  };
  include "level5(modifier_mapping)"
};

Then change <CAPS> to <LALT> and it might just work... I hope. You'd choose "lv5:caps_switch" but it'd actually affect the LAlt key. I hope. ^_^

[edit: Hack confirmed! Well, that's nice! ^_^]

Last edited by DreymaR (18-Oct-2018 08:32:10)

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

Offline
  • 0
  • Reputation: 0
  • Registered: 17-Oct-2018
  • Posts: 2

Thank you so much! It works like a charm!

Offline
  • 0
  • Reputation: 51
  • From: UK
  • Registered: 14-Apr-2014
  • Posts: 648

I also use LAlt as my Extend modifier, it works very well!

My solution was slightly different: I wanted to also map the Left Alt function to the "left windows" key. To do this I simply changed scan code definitions of <LALT>, <LWIN> and <CAPS> in `keycodes/evdev`. Achieves pretty much the same result, but lets you move arbitrary modifier keys to where you want them.

Last edited by stevep99 (19-Oct-2018 16:33:36)

Using Colemak Mod-DH with some additional ergonomic keyboard mods.

Offline
  • 0
  • Reputation: 0
  • Registered: 22-Nov-2018
  • Posts: 1

Sorry if this has been covered, but I couldn't find it.

I have a keyboard with QMK configured to DHm.

I would like to use this file for my laptop keyboard, but not for my external keyboard.

How does it work? Are input keys overridden at a system level or per keyboard? I don't want this to affect my external keyboard.

Offline
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Since you're talking about controllers, maybe you'll want to read in the other Big Bag topic (the USB-2-USB aka TMK one) too for more info.

However, I'll answer your question briefly. A Human Interface Device (HID) whether connected with USB or PS/2 or another protocol, can only send input events such as key/mouse/joystick "clicks". The OS cannot to my knowledge (certainly not for USB devices) identify these events as they don't have a "source tag" on them.

So you're a bit out of luck in this: Your QMK keyboard will send the same kind of events as your laptop keyboard does, and I don't know of a way to make them behave differently short of having a hotkey to switch your system settings quickly.

One suggestion might be to put your QMK keyboard in "throughput" mode though. I'd have a simple QWERTY layout on a lockable QMK layer, so you can use the laptop and external keyboard interchangeably without wringing your head. I've been doing something like that on my work computers.

Last edited by DreymaR (23-Nov-2018 13:52:39)

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

Offline
  • 0
  • Reputation: 0
  • Registered: Yesterday
  • Posts: 3

colemakmoddhhr.png

Hello, I am trying to set up the angle mod ANSI setup as in the picture, with the Left ALT key acting as a modifier for the Croatian symbols. I installed the package for Linux through Pacman and can see the additions in the keyboard layout selector, but am not sure how to make a custom layout. Neither for adding the Croatian symbols or even this version of the layout which is not included in the pack...Can anyone please help me set this up? I am using Manjaro btw.

Last edited by Anzick (Yesterday 23:34:58)
Online
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

Did you look at my locale topic to see my suggestion for Croatian++?

To use left Alt as selector, you'd have to perform several tricks. Why not use the right Alt like most others do? Or, failing that, you could swap left and right Alt?

Making custom XKB layouts is ... interesting. You should read about it on the web before proceeding, if you're certain you want to go through with it. But basically, you could use my Croatian suggestion (I think the actual mappings are in the file for Serbian – yeah, I know, but deal with it please hehe), comment out what you don't want and add only those keys you want to change instead. Your special letters go on levels 3-4.

Last edited by DreymaR (Today 09:47:01)

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

Offline
  • 0
  • Reputation: 0
  • Registered: Yesterday
  • Posts: 3

Sure, I could use the right alt. Yes I am overwhelmed by the process even though I have read through your first post a few times. I was able to do it in 2 minutes on macOS using an application called Ukelele. Is there no easier way? I tried using xkeycaps, but it is extremely old and didn't seem to function very well. However, shouldn't there at least be an easy way of installing the Colemak Mod DH angle mod with Z in the middle for ANSI keyboard since it is one of the main ones 'promoted' on the Colemak mod DH site? Is the hard part just adding the Croatian modifiers?

I also found this application: https://aur.archlinux.org/packages/keyb … ent-674625, but it doesn't seem to function either, when clicking on the character map button nothing happens.

Last edited by Anzick (Today 16:34:39)
Online
  • 0
  • Reputation: 90
  • From: Oslo, Norway
  • Registered: 13-Dec-2006
  • Posts: 4,505

The DH mod is part of my install. So is the ANSI-AngleZ mod. What SteveP has on his page is not my business.

It's not that hard to add the Croatian letters, but did you see my suggestion and consider whether that may work for you?

file

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

Offline
  • 0
  • Reputation: 0
  • Registered: Yesterday
  • Posts: 3

Ok thank you for your help in this matter. I do not see this variant on your install. The Curl-DH ergo mod comes close, but the bottom row is different. Is there another one I am missing? I did see your suggestion, however, I would prefer to set it up the way that I have described.

Last edited by Anzick (Today 16:48:44)
Online
  • 0