Skip to content

Commit

Permalink
🐛 FIX: Working backspace for exit on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
anafvana committed Apr 3, 2023
1 parent 74387d9 commit 3f4abdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/groupick/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Picker(Generic[OPTION_T]):
selected_indexes: Dict[str,List[int]] = field(init=False, default_factory=dict)
index: int = field(init=False, default=0)
screen: Optional["curses._CursesWindow"] = None
map_keys: bool = True

def __post_init__(self) -> None:
if len(self.options) == 0:
Expand Down Expand Up @@ -147,7 +148,7 @@ def run_loop(self, screen: "curses._CursesWindow") -> Optional[Dict[str, List[PI
KEYS_UP = (curses.KEY_UP, ord("k"))
KEYS_DOWN = (curses.KEY_DOWN, ord("j"))
KEYS_SELECT = [ord(str(x)) for x in self.groups]
KEYS_ESC = (curses.KEY_BACKSPACE,curses.KEY_LEFT)
KEYS_ESC = (curses.KEY_BACKSPACE, ord("\b"), curses.KEY_LEFT)

while True:
self.draw(screen)
Expand Down

0 comments on commit 3f4abdb

Please sign in to comment.