mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
Allow using function keys F21-F35 for keybindings (#14201)
I feel like the limitations on what can be bound are too strict. if an app _does_ support the Kitty keyboard protocol (Neovim, Reedline), I can map the function keys (F27-F35 as listed below). In Reedline everything works perfectly. The issue is for some reason we limit the keys that can be bound in Nushell, so I am unable to do that.
This commit is contained in:
parent
a6c2c685bc
commit
e0bb5a2bd2
@ -862,10 +862,10 @@ fn add_parsed_keybinding(
|
|||||||
c if c.starts_with('f') => c[1..]
|
c if c.starts_with('f') => c[1..]
|
||||||
.parse()
|
.parse()
|
||||||
.ok()
|
.ok()
|
||||||
.filter(|num| (1..=20).contains(num))
|
.filter(|num| (1..=35).contains(num))
|
||||||
.map(KeyCode::F)
|
.map(KeyCode::F)
|
||||||
.ok_or(ShellError::InvalidValue {
|
.ok_or(ShellError::InvalidValue {
|
||||||
valid: "'f1', 'f2', ..., or 'f20'".into(),
|
valid: "'f1', 'f2', ..., or 'f35'".into(),
|
||||||
actual: format!("'{keycode}'"),
|
actual: format!("'{keycode}'"),
|
||||||
span: keybinding.keycode.span(),
|
span: keybinding.keycode.span(),
|
||||||
})?,
|
})?,
|
||||||
|
Loading…
Reference in New Issue
Block a user