Skip to content

Commit e9e7acb

Browse files
committed
refresh bindings on keymap change
1 parent 3581413 commit e9e7acb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/textual/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3710,6 +3710,7 @@ def set_keymap(self, keymap: Keymap) -> None:
37103710
keymap: A mapping of binding IDs to key strings.
37113711
"""
37123712
self._keymap = keymap
3713+
self.refresh_bindings()
37133714

37143715
def update_keymap(self, keymap: Keymap) -> None:
37153716
"""Update the App's keymap, merging with `keymap`.
@@ -3721,6 +3722,7 @@ def update_keymap(self, keymap: Keymap) -> None:
37213722
keymap: A mapping of binding IDs to key strings.
37223723
"""
37233724
self._keymap = {**self._keymap, **keymap}
3725+
self.refresh_bindings()
37243726

37253727
def handle_bindings_clash(
37263728
self, clashed_bindings: set[Binding], node: DOMNode

0 commit comments

Comments
 (0)