Fix #2: fall back to uppercase N

This commit is contained in:
Philip Henning 2026-09-06 18:04:42 +02:00
parent 4615aed580
commit 73c18850c6
5 changed files with 28 additions and 6 deletions

View file

@ -183,6 +183,21 @@ async def test_enhanced_shift_n_opens_new_from_selected_but_caps_lock_n_does_not
assert not isinstance(app.screen, AddEntryModal)
@pytest.mark.asyncio
async def test_uppercase_n_is_a_fallback_when_the_terminal_lacks_enhanced_keys():
"""Legacy terminals use uppercase N for Shift+N and Caps Lock+N alike."""
app = app_with_filterable_entries()
app.edit_mode = True
async with app.run_test(size=(120, 40)) as pilot:
app.table_handler.populate_entries_table()
app.query_one("#entries-table").focus()
await pilot.press("N")
await pilot.pause()
assert isinstance(app.screen, AddEntryModal)
@pytest.mark.asyncio
async def test_new_from_selected_requires_a_visible_host_entry():
"""Shift+N does not reuse a stale selection when filters hide every entry."""