Skip to content

Commit

Permalink
Truncate multi output
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar committed May 22, 2024
1 parent 33846d5 commit af27578
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion keymap_drawer/parse/kanata.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ def recurse(new_binding):
alt_key = recurse(binding[2])
return LayoutKey(tap=main_key.tap, hold=main_key.hold, shifted=alt_key.tap)
if binding[0] == "multi":
return LayoutKey(tap=" +".join(recurse(bind).tap for bind in binding[1:]))
binds = [recurse(bind).tap for bind in binding[1:4]]
if len(binding) > 4:
binds[-1] = "…"
return LayoutKey(tap=" +".join(binds))

return LayoutKey(tap=binding_str)

Expand Down

0 comments on commit af27578

Please sign in to comment.