-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
We add mnemonics, underlined letters. Here, hitting Alt+o automatically jumps at 'foo2' etc. If no letter is available, it creates one (here, 'foo3', 'foo4', and 'foo5' have a, b,c).
#!/usr/bin/env python3
from dataclasses import dataclass
from typing import Literal
from mininterface import run
@dataclass
class Env:
foo1: str
foo2: int
foo3: float
foo4: bool
foo5: Literal["one", "two", "three"]
m = run(Env)
print(m.env)
Do a mechanism that adds mnemonics to select tag options.
Here, option 'one' would use 'n' (because 'o' is taken by 'foo2'), 'two' would take 't', and 'three' would take 'h'. If no letter is available, do not create one.
Here we set mnemonics for forms:
| def _determine_mnemonic(self, form: TagDict, also_nones=False): |
Here we register mnemonics in GUI:
| char = tag._mnemonic |
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers