MCPcopy Create free account

hub / github.com/Canop/crokey / functions

Functions63 in github.com/Canop/crokey

↓ 24 callersFunctioncheck_ok
(raw: &str, key: KeyCombination)
src/parse.rs:146
↓ 14 callersMethodto_string
return the key formatted into a string `format.to_string(key)` is equivalent to `format.format(key).to_string()`.
src/format.rs:128
↓ 13 callersMethodinto
(self)
src/key_combination.rs:189
↓ 4 callersMethodcombine
Take all the `down_keys`, combine them into a `KeyCombination`
src/combiner.rs:112
↓ 3 callersFunctionnormalize_key_code
Change the char to uppercase when the modifier shift is present, otherwise if the char is uppercase, return true. If the key is the '\r' or '\n' char,
src/key_combination.rs:36
↓ 3 callersFunctionparse_key_code
must be kept identical to crokey::parse_key_code (and yes, this duplication isn't ideal)
src/proc_macros/mod.rs:33
↓ 2 callersMethodformat
return a wrapper of the key implementing Display ``` use crokey::*; let format = KeyCombinationFormat::default(); let k = format.format(key!(f6)); le
src/format.rs:122
↓ 2 callersMethodnormalized
Return a normailzed version of the combination. Fix the case of the code to uppercase if the shift modifier is present. Add the SHIFT modifier if one
src/key_combination.rs:81
↓ 2 callersFunctionparse
parse a string as a keyboard key combination definition. About the case: The char we receive as code from crossterm is usually lowercase but uppercas
src/parse.rs:104
↓ 2 callersFunctionpop_keyboard_enhancement_flags
Restore the "normal" state of the terminal. This is done automatically by the combiner on drop, so you should usually not need to call this function.
src/combiner.rs:231
↓ 1 callersMethodcmp
(&self, other: &Self)
src/key_combination.rs:151
↓ 1 callersMethodenable_combining
Try to enable combining more than one non-modifier key into a combination. Return Ok(false) when the terminal doesn't support the kitty protocol. Be
src/combiner.rs:64
↓ 1 callersFunctionis_key_simple
For the purpose of key combination, we consider that a key is "simple" when it's neither a modifier (ctrl,alt,shift) nor a space.
src/combiner.rs:199
↓ 1 callersFunctionkey_code_to_token_stream
(key_code: KeyCode, code_span: Span)
src/proc_macros/mod.rs:102
↓ 1 callersFunctionparse_key_code
(raw: &str, shift: bool)
src/parse.rs:38
↓ 1 callersFunctionpush_keyboard_enhancement_flags
Change the state of the terminal to enable combining keys. This is done automatically by `Combiner::enable_combining` so you should usually not need t
src/combiner.rs:215
↓ 1 callersMethodtransform
Receive a key event and return a key combination if one is ready. When combining is enabled, the key combination is only returned on a key release ev
src/combiner.rs:130
↓ 1 callersMethodtransform_ansi
In ansi mode, no combination is possible, and we don't expect to receive anything else than a single key or than key presses.
src/combiner.rs:185
↓ 1 callersMethodtransform_combining
(&mut self, key: KeyEvent)
src/combiner.rs:137
Functionas_letter
Return the raw char if the crossterm key event is a letter event. Case of the code is not normalized, just as in the original event.
src/key_event.rs:8
Methodas_letter
return the raw char if the combination is a letter event
src/key_combination.rs:95
Functioncheck_key_parsing
()
src/parse.rs:144
Methoddefault
()
src/combiner.rs:42
Methoddefault
()
src/format.rs:72
Methoddeserialize
(deserializer: D)
src/key_combination.rs:108
Methoddisable_combining
Disable combining.
src/combiner.rs:82
Methoddrop
(&mut self)
src/combiner.rs:205
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/parse.rs:31
Methodfmt
(&self, f: &mut fmt::Formatter)
src/format.rs:139
Methodfmt
(&self, f: &mut fmt::Formatter)
src/key_combination.rs:135
Functionformat
()
src/lib.rs:335
Methodfrom
(key_event: KeyEvent)
src/key_combination.rs:141
Methodfrom_str
(s: &str)
src/key_combination.rs:129
Functionhygiene
()
tests/hygiene.rs:5
Methodis_ansi_compatible
Ansi terminals don't manage key press/release/repeat, so they don't allow to determine whether 2 keys are pressed at the same time. This means a combi
src/key_combination.rs:70
Methodis_combining
(&self)
src/combiner.rs:97
Functionkey
()
src/lib.rs:277
Functionkey
(input: TokenStream1)
src/proc_macros/mod.rs:229
Functionkey_pattern
()
src/lib.rs:346
Functionmain
()
tests/ui/invalid-modifier.rs:1
Functionmain
()
tests/ui/duplicate-modifier.rs:1
Functionmain
()
tests/ui/unexpected-eof.rs:1
Functionmain
()
tests/ui/invalid-key.rs:1
Functionmain
()
examples/deser_keybindings/src/main.rs:36
Functionmain
()
examples/print_key/src/main.rs:11
Functionmain
()
examples/print_key_no_combiner/src/main.rs:11
Methodnew
(s: S)
src/parse.rs:25
Methodnew
Create a new `KeyCombination` from one to three keycodes and a set of modifiers
src/key_combination.rs:55
Functionno_mod
(code: KeyCode)
src/lib.rs:272
Methodone_key
Create a new `KeyCombination` from one keycode and a set of modifiers
src/key_combination.rs:60
Methodparse
(input: ParseStream<'_>)
src/proc_macros/mod.rs:142
Methodpartial_cmp
(&self, other: &Self)
src/key_combination.rs:156
Methodserialize
(&self, serializer: S)
src/key_combination.rs:119
Methodset_keyboard_enhancement_flags_externally_managed
Tell the Combiner not to push/pop the keyboard enhancement flags. Call before `enable_combining` if you want to manage the flags yourself. (for examp
src/combiner.rs:94
Methodset_mandate_modifier_for_multiple_keys
When combining is enabled, you may either want "simple" keys (i.e. without modifier or space) to be handled on key press, or to wait for a key release
src/combiner.rs:108
Methodtry_from
Try to create a `KeyCombination` from a slice of key events, will fail if and only if the slice is empty.
src/key_combination.rs:165
Functionui
()
src/lib.rs:361
Methodwith_alt
(mut self, s: S)
src/format.rs:100
Methodwith_command
(mut self, s: S)
src/format.rs:96
Methodwith_control
(mut self, s: S)
src/format.rs:92
Methodwith_implicit_shift
(mut self)
src/format.rs:108
Methodwith_lowercase_modifiers
(mut self)
src/format.rs:86
Methodwith_shift
(mut self, s: S)
src/format.rs:104