mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-22 06:05:47 -06:00
feat(gui/messagebox): add number keys
Signed-off-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
This commit is contained in:
parent
a7571dfbb3
commit
11eecfbe7d
1 changed files with 5 additions and 1 deletions
|
|
@ -209,7 +209,11 @@ class MessageBox(Displayable): # pylint: disable=too-many-instance-attributes
|
|||
for key in option.keys:
|
||||
keymaps.copy('messagebox', option.key, key)
|
||||
|
||||
if len(set('0123456789').intersection(keymaps['messagebox'])) and self.num_options <= 9:
|
||||
keymaps['messagebox'][keymaps.keybuffer.quantifier_key] = 'false'
|
||||
if (
|
||||
len(set('0123456789').intersection(keymaps['messagebox'])) == 0
|
||||
and self.num_options <= 9
|
||||
):
|
||||
for key_n, option in zip('123456789', self.options):
|
||||
keymaps.copy('messagebox', option.key, key_n)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue