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:
We add mnemonics, underlined letters. Here, hitting
Alt+oautomatically jumps at 'foo2' etc. If no letter is available, it creates one (here, 'foo3', 'foo4', and 'foo5' havea, b,c).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:
mininterface/mininterface/_mininterface/adaptor.py
Line 55 in a9c4c70
Here we register mnemonics in GUI:
mininterface/mininterface/_tk_interface/utils.py
Line 281 in a9c4c70