Skip to content

Commit 2aa9171

Browse files
cyprianitrilowy
authored andcommitted
fix(ergol-kanata): CapsLock-related bugs
Fix bugs on some keys when CapsLock is enabled by using the `unicode` function throughout, instead of aliasing keys from the base layout. This also increases portability to non-AZERTY system keymaps, as the non-base layers are now completely keymap-agnostic. NB The `unicode` function works with the parenthesis and double quote characters only starting with Kanata 1.7.0.
1 parent d433298 commit 2aa9171

File tree

4 files changed

+45
-46
lines changed

4 files changed

+45
-46
lines changed

drivers/ergol-kanata/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
An Ergo-L "portable" driver, emulated with Kanata over your regular keymap.
44

5+
## Prerequisites
6+
7+
Kanata v1.7.0+ is required.
8+
59
## Caveats
610

711
- Only Windows is supported at this point; this *doesn’t work* on GNU/Linux
812
(yet?) and is untested on macOS.
913
- Only Azerty-FR is supported as the base keymap at this point.
1014
- Mac keyboards are not supported at this point.
11-
- CapsLock can have unexpected behaviour, please report bugs.
1215
- Not all the dead keys on the AltGr-Shift layer are implemented yet.
1316
- Some other exotic characters may be missing, please report bugs.
1417
- Layer taps are not supported at this point.

drivers/ergol-kanata/defalias_azerty_pc.kbd

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,6 @@
2626
. S-,
2727
)
2828

29-
;; Symbols layer
30-
(defalias
31-
32-
^ (macro [ spc)
33-
< <
34-
> S-<
35-
$ ]
36-
% S-'
37-
@ AG-0
38-
& 1
39-
* \
40-
' 4
41-
` (macro AG-7 spc)
42-
43-
{ AG-4
44-
pl 5
45-
pr -
46-
} AG-=
47-
= =
48-
\ AG-8
49-
+ S-=
50-
- 6
51-
/ S-.
52-
'' 3
53-
54-
~ (macro AG-2 spc)
55-
[ AG-5
56-
] AG--
57-
_ 8
58-
# AG-3
59-
| AG-6
60-
! /
61-
; ,
62-
: .
63-
? S-m
64-
)
65-
6629
;; NumRow layer
6730
(defalias
6831

drivers/ergol-kanata/deflayer_base_over_azerty.kbd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
;; right-hand "extras"
4848
brk1 (t! dk-sft [ {)
4949
brk2 (t! dk-sft ] })
50-
qte (fork 4 (unshift 3) (lsft rsft)) ;; ' "
50+
qte (t! dk-sft ' r#"""#) ;; ' "
5151
bksl (t! dk-sft \ |)
5252

5353
;; lower row
@@ -58,10 +58,10 @@
5858

5959
;; sft0
6060
(defalias
61-
?sft m
62-
!sft (unshift /)
63-
;sft (unshift ,)
64-
:sft (unshift .)
61+
?sft (unicode ?)
62+
!sft (unicode !)
63+
;sft (unicode ;)
64+
:sft (unicode :)
6565
)
6666

6767
;; Dead key layer 1
@@ -82,16 +82,16 @@
8282
Œ (t! dk-sft œ Œ)
8383
Ô (t! dk-sft ô Ô)
8484
µ (fork (unicode µ) XX (lsft rsft))
85-
_dk (unshift 8)
85+
_dk (unicode _)
8686
Û (t! dk-sft û Û)
8787

8888
À (t! dk-sft à À)
8989
É (t! dk-sft é É)
9090
È (t! dk-sft è È)
9191
Ê (t! dk-sft ê Ê)
9292
Ñ (t! dk-sft ñ Ñ)
93-
lpar (fork 5 XX (lsft rsft))
94-
rpar (fork - XX (lsft rsft))
93+
lpar (unicode r#"("#) ;; (
94+
rpar (unicode r#")"#) ;; )
9595
Î (t! dk-sft î Î)
9696
Ï (t! dk-sft ï Ï)
9797
Ù (t! dk-sft ù Ù)

drivers/ergol-kanata/deflayer_symbols_lafayette.kbd

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,39 @@
1515
₈ (unicode ₈)
1616
₉ (unicode ₉)
1717
₀ (unicode ₀)
18+
19+
^ (unicode ^)
20+
< (unicode <)
21+
> (unicode >)
22+
$ (unicode $)
23+
% (unicode %)
24+
@ (unicode @)
25+
& (unicode &)
26+
* (unicode *)
27+
' (unicode ')
28+
` (unicode `)
29+
30+
{ (unicode {)
31+
pl (unicode r#"("#) ;; (
32+
pr (unicode r#")"#) ;; )
33+
} (unicode })
34+
= (unicode =)
35+
\ (unicode \)
36+
+ (unicode +)
37+
- (unicode -)
38+
/ (unicode /)
39+
'' (unicode r#"""#) ;; "
40+
41+
~ (unicode ~)
42+
[ (unicode [)
43+
] (unicode ])
44+
_ (unicode _)
45+
# (unicode #)
46+
| (unicode |)
47+
! (unicode !)
48+
; (unicode ;)
49+
: (unicode :)
50+
? (unicode ?)
1851
)
1952

2053
;; shifted symbols layer aliases

0 commit comments

Comments
 (0)