From c7a0a404fef1d745cb36c371c9b2083095bb4426 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Mon, 20 Feb 2023 21:46:07 -0600 Subject: [PATCH] modifiers are ... not the same on every machine huh --- src/main.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/main.rs b/src/main.rs index cd63ffc..e1dc178 100644 --- a/src/main.rs +++ b/src/main.rs @@ -306,24 +306,8 @@ fn main() -> Result<()> { None, ))?; } - } else if key_code == 74 && modifiers == 40 { - // key j modifier ctrl - // let text = "X"; + } else if key_code == 74 && modifiers | Console::LEFT_CTRL_PRESSED > 0 { let text = "•"; - // let z = text.encode_utf16().map(|c| c.to_ne_bytes()); - //let t16: Vec = text - // .encode_utf16() - // .chain(std::iter::once(0 as u16)) - // .collect(); - // t16.as_ptr() - // let (_, k, _) = t16.align_to::(); - // let x: &[u8] = &[0x20, 0x22, 0x00, 0x00]; - //let x: &[u16] = &[0x2022]; - //let mut z = x[0].to_ne_bytes(); - //let z: [u8] = [(0x2022 as u16).to_ne_bytes()]; - //let mut z = Vec::new(); - //text.as_bytes() - Error::check(Console::WriteConsoleA( stdout, text.as_bytes(),