MCPcopy Create free account
hub / github.com/TyberiusPrime/KeyToKey / test_sequence_unicode_trigger

Function test_sequence_unicode_trigger

src/handlers/sequence.rs:164–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162
163 #[test]
164 fn test_sequence_unicode_trigger() {
165 use crate::key_codes::KeyCode::*;
166
167 let map = &[0xDF, B.to_u32(), C.to_u32()];
168 let l = Sequence::new(map, X, 3);
169 let mut k = Keyboard::new(KeyOutCatcher::new());
170 k.output.state().unicode_mode = UnicodeSendMode::Debug;
171 k.add_handler(Box::new(l));
172 k.add_handler(Box::new(UnicodeKeyboard::new()));
173 k.add_handler(Box::new(USBKeyboard::new()));
174
175 k.pc(0xDF, &[&[]]);
176 k.rc(0xDF, &[&[D], &[F], &[]]);
177
178 k.pc(B, &[&[B]]);
179 k.rc(B, &[&[]]);
180
181 k.pc(C, &[&[C]]);
182 k.rc(C, &[&[BSpace], &[], &[BSpace], &[], &[BSpace], &[], &[X]]);
183 }
184 #[test]
185 fn test_sequence_private_trigger() {
186 use crate::key_codes::KeyCode::*;

Callers

nothing calls this directly

Calls 5

to_u32Method · 0.80
stateMethod · 0.80
add_handlerMethod · 0.80
pcMethod · 0.80
rcMethod · 0.80

Tested by

no test coverage detected