我使用的自定义布局基本上是德国 PUQ 布局的重大修改变体,我最初只是在 AdNW 布局上编写,为了防止它被更新覆盖,我现在将其配置为自定义布局。然而,与修改后的 AdNW 布局不同,当我将其加载到 Gnome 中时,即使我只是复制粘贴它并更改了名称,该布局也无法识别级别开关设置。这是为什么?我该如何改变它?作为参考,这是布局:
partial alphanumeric_keys
xkb_symbols "custom_base" {
include "de(neo_base)"
key.type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK";
key <AD04> { [ comma, enfilledcircbullet, NoSymbol, U03D1, NoSymbol, NoSymbol, U2203, NoSymbol ] };
key <AB04> { [ period, endash, NoSymbol, U03F1, NoSymbol, NoSymbol, U2261, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
key <AD01> { [ p, P, NoSymbol, Greek_pi, NoSymbol, Greek_PI, multiply, U043F ] };
key <AD02> { [ u, U, NoSymbol, NoSymbol, NoSymbol, NoSymbol, U2200, U0443 ] };
key <AD03> { [ udiaeresis, Udiaeresis, NoSymbol, Greek_chi, NoSymbol, NoSymbol, U2191, U044B ] };
key <AD05> { [ q, Q, NoSymbol, NoSymbol, NoSymbol, NoSymbol, U22C9, U044C ] };
key <AD06> { [ v, V, NoSymbol, NoSymbol, NoSymbol, NoSymbol, U22CA, U0432 ] };
key <AD07> { [ c, C, NoSymbol, NoSymbol, 4, NoSymbol, U227A, U0447 ] };
key <AD08> { [ l, L, NoSymbol, Greek_lambda, 5, Greek_LAMBDA, U2227, U043B ] };
key <AD09> { [ m, M, NoSymbol, Greek_mu, 6, NoSymbol, U227B, U043C ] };
key <AD10> { [ f, F, NoSymbol, Greek_phi, NoSymbol, Greek_PHI, U220F, U0444 ] };
key <AD11> { [ adiaeresis, Adiaeresis, NoSymbol, NoSymbol, NoSymbol, NoSymbol, U2210, U044A ] };
key <AC01> { [ h, H, NoSymbol, Greek_eta, NoSymbol, NoSymbol, U2194, U0445 ] };
key <AC02> { [ i, I, NoSymbol, Greek_iota, NoSymbol, NoSymbol, U2190, U0438 ] };
key <AC03> { [ e, E, NoSymbol, Greek_epsilon, NoSymbol, NoSymbol, U2193, U044D ] };
key <AC04> { [ a, A, NoSymbol, Greek_alpha, NoSymbol, U2135, U2192, U044F ] };
key <AC05> { [ o, O, NoSymbol, Greek_omicron, NoSymbol, NoSymbol, U21A6, U043E ] };
key <AC06> { [ d, D, NoSymbol, Greek_delta, NoSymbol, Greek_DELTA, partialderivative, U0434 ] };
key <AC07> { [ t, T, NoSymbol, Greek_tau, 1, NoSymbol, U003C, U0442 ] };
key <AC08> { [ r, R, NoSymbol, Greek_rho, 2, NoSymbol, U2228, U0440 ] };
key <AC09> { [ n, N, NoSymbol, Greek_nu, 3, NoSymbol, U003E, U043D ] };
key <AC10> { [ s, S, NoSymbol, Greek_sigma, NoSymbol, Greek_SIGMA, U221E, U0441 ] };
key <AC11> { [ ssharp, U1E9E, NoSymbol, Greek_finalsmallsigma, NoSymbol, NoSymbol, jot, NoSymbol ] };
key <AB01> { [ k, K, NoSymbol, Greek_kappa, NoSymbol, NoSymbol, U2211, U043A ] };
key <AB02> { [ y, Y, NoSymbol, Greek_upsilon, NoSymbol, NoSymbol, U222B, U044E ] };
key <AB03> { [ x, X, NoSymbol, Greek_xi, NoSymbol, Greek_XI, U2205, NoSymbol ] };
key <AB05> { [ odiaeresis, Odiaeresis, NoSymbol, Greek_psi, NoSymbol, Greek_PSI, U221D, U0446 ] };
key <AB06> { [ j, J, NoSymbol, Greek_theta, 0, Greek_THETA, U221E, U0437 ] };
key <AB07> { [ g, G, NoSymbol, Greek_gamma, 7, Greek_GAMMA, radical, U0433 ] };
key <AB08> { [ z, Z, NoSymbol, Greek_zeta, 8, NoSymbol, U2225, U0436 ] };
key <AB09> { [ w, W, NoSymbol, Greek_omega, 9, Greek_OMEGA, U2223, U0437 ] };
key <AB10> { [ b, B, NoSymbol, Greek_beta, NoSymbol, U05D1, U222B, U0431 ] };
key <LSGT> { [ ssharp, U1E9E, NoSymbol, Greek_finalsmallsigma, NoSymbol, NoSymbol, U2208, U0448 ] };
key <BKSL> { [ at, U1E9E, NoSymbol, Greek_finalsmallsigma, NoSymbol, NoSymbol, U22C8, U0449 ] };
};
partial alphanumeric_keys modifier_keys keypad_keys
xkb_symbols "custom" {
include "custom(custom_base)"
name[Group1]= "Custom";
include "shift(both_capslock)"
include "level3(caps_switch)"
include "level3(ac11_switch)"
include "level5(ralt_switch_lock)"
};
编辑: 的输出setxkbmap -print -verbose 10
是
Setting verbose level to 10
WARNING: Running setxkbmap against an XWayland server
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
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+us+inet(evdev)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};
编辑:运行后setxkbmap -layout custom
,输出setxkbmap -print -verbose 10
是
Setting verbose level to 10
WARNING: Running setxkbmap against an XWayland server
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: custom
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+custom+inet(evdev)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+custom+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
请注意,这似乎完全独立于我实际使用的键盘映射,它是由 Gnome 选择的。
Edit3:似乎 wayland 覆盖了setxkbmap
设置。在 X11 下,我可以使用 设置布局setxkbmap
,但问题仍然存在。但输出setxkbmap -layout custom
略有不同:
[alex@alex ~]$ setxkbmap -print -verbose 10
Setting verbose level to 10
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: custom,us
variant: ,
options: lv3:ralt_switch,compose:menu
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+custom+us:2+inet(evdev)+level3(ralt_switch)+compose(menu)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+custom+us:2+inet(evdev)+level3(ralt_switch)+compose(menu)" };
xkb_geometry { include "pc(pc105)" };
};