Skip to content

Issue with max layers/valid layers #1148

@keriefie

Description

@keriefie

I am trying to make a remapping with several layouts for different purposes. The default layout (without modifications). A layout for IPA (International Phonetic Alphabet), and one for glossing (including small caps for glossing abbreviations, as well as some miscellaneous punctuation). This way I can use my keyboard for doing different linguistics tasks seamlessly.

When using just the default and IPA layout there are no problems. However, when I add the glossing layout all hell breaks loose. Adding it in its entirety causes keyd to crash, and adding it with a single test declaration causes some errors. There seems to be an issue with max layers and some layers being 'invalid'. There are a lot of sections, but the total number of layers is not that high.

The line numbers are quite unhelpful since they don't correspond with the line numbers in the files.

When the glossing layout is fully implemented:

Nov 03 14:24:00 astrolabe systemd[1]: Started key remapping daemon.
Nov 03 14:24:00 astrolabe keyd[8678]: CONFIG: parsing /etc/keyd/default.conf
Nov 03 14:24:00 astrolabe keyd[8678]: keyd: src/ini.c:110: ini_parse_string: Assertion `n < MAX_SECTIONS' failed.
Nov 03 14:24:00 astrolabe systemd-coredump[8684]: [🡕] Process 8678 (keyd) of user 0 dumped core.
                                                  
                                                  Stack trace of thread 8678:
                                                  #0  0x00007f4ae369894c n/a (libc.so.6 + 0x9894c)
                                                  #1  0x00007f4ae363e410 raise (libc.so.6 + 0x3e410)
                                                  #2  0x00007f4ae362557a abort (libc.so.6 + 0x2557a)
                                                  #3  0x00007f4ae36254e3 n/a (libc.so.6 + 0x254e3)
                                                  #4  0x0000559dbb2b7813 n/a (/usr/bin/keyd + 0x8813)
                                                  #5  0x0000559dbb2b7cc6 n/a (/usr/bin/keyd + 0x8cc6)
                                                  #6  0x0000559dbb2b8402 n/a (/usr/bin/keyd + 0x9402)
                                                  #7  0x0000559dbb2b15ec n/a (/usr/bin/keyd + 0x25ec)
                                                  #8  0x00007f4ae3627675 n/a (libc.so.6 + 0x27675)
                                                  #9  0x00007f4ae3627729 __libc_start_main (libc.so.6 + 0x27729)
                                                  #10 0x0000559dbb2b1675 n/a (/usr/bin/keyd + 0x2675)
                                                  ELF object binary architecture: AMD x86-64
Nov 03 14:24:00 astrolabe systemd[1]: keyd.service: Main process exited, code=dumped, status=6/ABRT
Nov 03 14:24:00 astrolabe systemd[1]: keyd.service: Failed with result 'core-dump'.

When the glossing layout contains a single test declaration:

Nov 03 14:25:23 astrolabe systemd[1]: Started key remapping daemon.
Nov 03 14:25:23 astrolabe keyd[8894]: CONFIG: parsing /etc/keyd/default.conf
Nov 03 14:25:23 astrolabe keyd[8894]:         WARNING: max layers (32) exceeded
Nov 03 14:25:23 astrolabe keyd[8894]:         ERROR: line 203: capslock is not a valid layer
Nov 03 14:25:23 astrolabe keyd[8894]:         ERROR: line 207: capslock is not a valid layer
Nov 03 14:25:23 astrolabe keyd[8894]:         ERROR: line 208: capslock is not a valid layer
Nov 03 14:25:23 astrolabe keyd[8894]:         ERROR: line 209: capslock is not a valid layer
Nov 03 14:25:23 astrolabe keyd[8894]: Starting keyd v2.5.0 ()
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: ignoring 0fac:1ade:d2b36ae6  (keyd virtual pointer)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: match    0000:0000:c782a12e  /etc/keyd/default.conf        (Asus WMI hotkeys)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: ignoring 056a:03c7:86574cf7  (Wacom Intuos BT M Pad)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: ignoring 056a:03c7:4ab17201  (Wacom Intuos BT M Pen)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: match    0000:0006:bdb72f48  /etc/keyd/default.conf        (Video Bus)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: match    046d:c08b:db29dc6c  /etc/keyd/default.conf        (Logitech G502 HERO Gaming Mouse Keyboard)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: match    1b1c:1b3f:f41e00e8  /etc/keyd/default.conf        (Corsair Corsair Gaming K68 Keyboard)
Nov 03 14:25:23 astrolabe keyd[8894]: DEVICE: ignoring 046d:c08b:15ad94e9  (Logitech G502 HERO Gaming Mouse)

default.conf:

include normal
include ipa
include glossing

[ids]

*

[global]
default_layout = normal

[main]
capslock = layer(capslock)
end = setlayout(normal)

[capslock]
f1 = setlayout(normal)
f2 = setlayout(ipa)
f3 = setlayout(glossing)

normal:

[normal:layout]

ipa:

[ipa:layout]
altgr = layer(ipa_altgr)
leftshift = layer(ipa_shift)
rightshift = layer(ipa_rightshift)
capslock = layer(ipa_capslock)
o+e = œ
a+e = æ
o+/ = ø
o+- = ɵ
r+l = ɺ

[ipa_altgr:G]
m = ɱ
n = ŋ
p = ʘ
f = ɸ
b = β
t = θ
d = ð
c = ç
j = ɟ
g = ɣ
s = ʃ
z = ʒ
v = ʌ
x = χ
h = ħ
l = ɬ
r = ɾ
y = ʎ
w = ʍ
i = ɨ
u = ʉ
a = ɑ
o = ɔ
e = ɛ
q = ʔ
q+- = ʡ
l+z = ɮ
\ = ‖
/ = ⫽
= = ǂ
[ = ⟦
] = ⟧
, = 〈
. = 〉
1 = ǃ
2 = oneshot(lowtone)
3 = oneshot(midtone)
4 = oneshot(hightone)

[ipa_shift:S]
o+e = ɶ
n = ɴ
y = ʏ
g = ɢ
r = ʀ
h = ʜ
u = ʊ
i = ɪ
w = ʬ
l = ʟ

[ipa_altgr+ipa_shift]
g = ɤ
i = ᵻ
u = ᵿ
9 = ⸨
0 = ⸩
, = ⟪
. = ⟫
1 = ¡

[ipa_capslock]
k = ʞ
h = ɥ
r = ɹ
w = ʍ
m = ɯ
a = ɐ
e = ə
o+e = ɞ
q = ʕ
q+- = ʢ
r+l = ɺ
, = ‹
. = ›

[ipa_shift+ipa_capslock]
r = ʁ
\ = ǀ


[ipa_capslock+ipa_altgr]
q = ʕ
m = ɰ
a = ɒ
e = ɜ
q+- = ʢ
o+e = ɞ
\ = ǁ

[ipa_rightshift:S]
, = oneshot(ipa_leftmod)
. = oneshot(ipa_rightmod)
' = oneshot(ipa_modifierletters)

[ipa_rightmod]
n = ɳ
d = ɖ
j = ʝ
g = ɠ
s = ʂ
z = ʐ
v = ⱱ
r = ɽ
l = ɭ
h = ɦ
r+l = 𝼈

[ipa_leftmod]
n = ɲ
c = ɕ
z = ʑ
v = ʋ

[ipa_rightmod+ipa_shift]
d = ɗ
g = ʛ

[ipa_rightmod+ipa_shift+ipa_altgr]
d = ᶑ

[ipa_rightmod+ipa_altgr]
j = ʄ
l = ꞎ
1 = 𝼊

[ipa_rightmod+ipa_capslock]
r = ɻ
r+l = 𝼈

[ipa_rightshift+ipa_rightmod]
, = oneshot(ipa_bothmod)

[ipa_rightshift+ipa_leftmod]
. = oneshot(ipa_bothmod)

[ipa_bothmod]
h = ɧ

# Tone

[hightone]
space = ́
4 = ̋
2 = oneshot(highlowtone)
3 = ᷇
a = w

[midtone]
space = ̄
4 = ᷄
2 = ᷆

[lowtone]
space = ̀
2 = ̏
4 = oneshot(lowhightone)
3 = ᷅

[highlowtone]
space = ̂
4 = ᷉

[lowhightone]
space = ̌
2 = ᷈

[ipa_modifierletters]
h = ʰ
k = ᵏ
m = ᵐ
n = ⁿ
g = ᶢ
' = ʼ

[ipa_modifierletters+ipa_altgr]
n = ᵑ
m = ᶬ

glossing (full):

[glossing:layout]
altgr = layer(glossing_altgr)
capslock = layer(glossing_capslock)
shift = layer(glossing_shift)

[glossing_altgr:G]
, = ›
. = ‹
= = ꞊
- = ‐
[ = ⟨
] = ⟩
6 = √
0 = ∅
` = ≈
m = μ
f = φ
\ = ∥
' = ′

[glossing_altgr+glossing_shift]
= = ≠
m = ♂
f = ♀
, = ←
. = →

[glossing_capslock]
a = ᴀ
b = ʙ
c = ᴄ
d = ᴅ
e = ᴇ
f = ꜰ
g = ɢ
h = ʜ
i = ɪ
j = ᴊ
k = ᴋ
l = ʟ
m = ᴍ
n = ɴ
o = ᴏ
p = ᴘ
q = ꞯ
r = ʀ
s = ꜱ
t = ᴛ
u = ᴜ
v = ᴠ
w = ᴡ
x = x
y = ʏ
z = ᴢ

glossing (stripped):

[glossing:layout]
j = a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions