We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fn
defsrc
I copied the template from https://github.com/kmonad/kmonad/blob/master/keymap/template/apple.kbd with some slight alterations in an attempt to get KMonad working with the internal Apple keyboard on an M2 MacBook Air running Asahi-NixOS.
I am configuring the defcfg block via the provided NixOS module. Then, I try this configuration:
defcfg
(defsrc esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 grv 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ caps a s d f g h j k l ; ' ret lsft z x c v b n m , . / rsft up fn lctl lmet lalt spc ralt rmet left down rght ) (defalias fn (around (layer-toggle apple) fn)) (deflayer default _ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @fn _ _ _ _ _ _ _ _ _ ) (defalias dsh dashboard rec record ) (deflayer apple _ brdn brup @dsh find @rec XX prev pp next mute vold volu _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ )
And the build fails every time when it gets to fn in the defsrc:
kmonad: Parse error at 16:2: | 16 | fn lctl lmet lalt spc ralt rmet left down rght | ^ unexpected 'f' expecting ')'
Based on what I see in the keycodes file, the fn keycode is only allowed on Darwin, so I imagine that's why there's a parse error.
If it helps, here's the output of wev when I press the Fn key:
wev
[14: wl_keyboard] key: serial: 24579; time: 13972728; key: 472; state: 1 (pressed) sym: XF86Fn (268964304), utf8: ''
Edit:
If I omit fn from the defsrc, an error occurs in the defalias where I also tried to use fn:
defalias
kmonad: Parse error at 29:44: | 29 | (defalias fn (around (layer-toggle apple) fn)) | ^ Unrecognized compose-char
Once I remove all traces of fn, the file parses and the build succeeds.
The text was updated successfully, but these errors were encountered:
Seems like Keycode.hs has a conditional that prevents this key from being available on non-darwin hosts:
Keycode.hs
data Keycode … #ifdef darwin_HOST_OS | KeyFn | KeyLaunchpad | KeyMissionCtrl | KeySpotlight | KeyDictation #endif
Sorry, something went wrong.
No branches or pull requests
I copied the template from https://github.com/kmonad/kmonad/blob/master/keymap/template/apple.kbd with some slight alterations in an attempt to get KMonad working with the internal Apple keyboard on an M2 MacBook Air running Asahi-NixOS.
I am configuring the
defcfg
block via the provided NixOS module. Then, I try this configuration:And the build fails every time when it gets to
fn
in thedefsrc
:Based on what I see in the keycodes file, the
fn
keycode is only allowed on Darwin, so I imagine that's why there's a parse error.If it helps, here's the output of
wev
when I press the Fn key:Edit:
If I omit
fn
from thedefsrc
, an error occurs in thedefalias
where I also tried to usefn
:Once I remove all traces of
fn
, the file parses and the build succeeds.The text was updated successfully, but these errors were encountered: