Skip to content
New issue

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

Bug: fn does not toggle Touch Bar change on Mac #1311

Open
1 task done
rkosmala opened this issue Oct 28, 2024 · 2 comments
Open
1 task done

Bug: fn does not toggle Touch Bar change on Mac #1311

rkosmala opened this issue Oct 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it.

Comments

@rkosmala
Copy link

Requirements

Describe the bug

Mac OS allows configuring Touch Bar stripe to change it's state depending on fn being pressed or not.
When kanata is executing Touch Bar becomes frozen in the state it was upon kanata startup and no longer respond to fn being pressed. It seems irrelevant what functions are assigned to both Touch Bar states in OSX System Preferences.
Mapping standard keys in layer triggered with fn works fine.

Relevant kanata config

(defcfg
  danger-enable-cmd yes
  process-unmapped-keys yes
)

(defvar
  tap-timeout   250
  hold-timeout  250
)

(deftemplate tap-hold-tmpl (tap-key early-hold-release-list hold-action)
  (tap-hold-release-keys $tap-timeout $hold-timeout (multi $tap-key @tap) $hold-action $early-hold-release-list)
)

(defalias
    fn (tap-hold $tap-timeout $hold-timeout fn (layer-toggle function))
)

(defsrc
  esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12             ssrq slck pause
       1    2    3    4    5    6    7    8    9    0    -    =    bspc       ins  home pgup
  tab  q    w    e    r    t    y         u    i    o    p    [    ]    ret   del  end  pgdn
  caps a    s    d    f    g    h         j    k    l    ;    '    \
  lsft grv  z    x    c    v    b    n    m    ,    .    /    rsft                 up
  fn   lctl lmet lalt           spc                 ralt rmet cmp  rctl       left down rght
)

(deflayer base
  @bl  brdn brup _    @spt bldn blup prev pp   next mute vold volu            _    _    _
       _    _    _    _    _    _    _    _    _    _    _    _    @bl        _    _    _
  @bl  _    @w   @e   @r   _    _         _    @i   @o   _    _    _    @bl   _    _    _
  lctl @a   @s   @d   @f   _    _         _    @k   @l   @;   @'   _
  @bl  _    _    _    @c   _    _    _    _    _    _    _    @bl                  @bl
  @fn  caps @bl  @bl            @sp                 @bl  @ct  @bl  @bl        @bl  @bl  @bl
)
 
(deflayer function
  _    f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12             _    _    _
       _    _    _    _    _    _    _    _    _    _    _    _    del        _    _    _
  _    _    _    _    _    _    _         _    _    _    _    _    _    _     _    _    _
  _    _    _    _    _    _    _         _    _    _    _    _    _
  _    lrld _    _    _    _    _    _    _    _    _    _    _                    pgup
  _    _    _    _              _                   _    _    _    _          home pgdn end
)

To Reproduce

  1. set up OS X preferences for Touch Bar to: Touch Bar shows: Extended Control Strip, Press and hold fn key to: Show F1, F2, etc. keys
  2. run kanata (fn key released upon startup)
  3. press fn key

Expected behavior

Touch Bar shows F1, F2 keys

Kanata version

1.7.0

Debug logs

No response

Operating system

Mac OS Sonoma 14.6.1

Additional context

No response

@rkosmala rkosmala added the bug Something isn't working label Oct 28, 2024
@jtroo jtroo added the macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it. label Oct 28, 2024
@jtroo
Copy link
Owner

jtroo commented Oct 28, 2024

Does karabiner handle this correctly? Is there any insight to be gained from this ticket: #975 ?

@rkosmala
Copy link
Author

To my understanding #975 only proposes some workaround to put different functions which Touch Bar provides (volume, brightness control, etc), as a programatic layer under F1-F12 keys with Fn modifier.
I have found this description in Karabiner Elements docs. Does it means kanata is also unable to signal Mac to change Touch Bar as it acts upon KE virtual keyboard?
Don't know if it's relevant, but on System preferences->Keyboard Shortcuts->Modifier Keys I see KE virtual driver provides Globe key, whereas on older Macs with Touch Bar internal keyboard shows Function Key instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it.
Projects
None yet
Development

No branches or pull requests

2 participants