joshuto icon indicating copy to clipboard operation
joshuto copied to clipboard

cannot use `ctrl+arrow_up/down`; because termion backend doesnt support it

Open alexzanderr opened this issue 2 years ago • 1 comments

So it looks like termion (the library that joshuto uses for input), it only supports Ctrl/Alt + a character https://docs.rs/termion/latest/termion/event/enum.Key.html

So Ctrl+arrow_up/arrow_down is currently not supported

https://gitlab.redox-os.org/redox-os/termion/-/issues/194

https://gitlab.redox-os.org/redox-os/termion/-/merge_requests/175

Originally posted by @kamiyaa in https://github.com/kamiyaa/joshuto/issues/186#issuecomment-1193335622

alexzanderr avatar Jul 24 '22 16:07 alexzanderr

# ~/.config/joshuto/keymap.toml

[default_view]
keymap = [
	{ keys = [ "ctrl+arrow_up"], command = "preview_cursor_move_up" },
	{ keys = [ "ctrl+arrow_down"], command = "preview_cursor_move_down" },

this config doesnt work and results in a message at runtime such as:

❱  cargo run --all-features
   Compiling joshuto v0.9.4 (...)
    Finished dev [unoptimized + debuginfo] target(s) in 4.73s
     Running `target/debug/joshuto`
Error: Keybindings ambiguous for preview_cursor_move_down

alexzanderr avatar Jul 24 '22 16:07 alexzanderr