diff --git a/services/ime-frontend/src/main.rs b/services/ime-frontend/src/main.rs index fc16e7df5..3036bd174 100644 --- a/services/ime-frontend/src/main.rs +++ b/services/ime-frontend/src/main.rs @@ -146,7 +146,7 @@ impl InputTracker { } fn insert_prediction(&mut self, index: usize) { - let debug1 = true; + let debug1 = false; if debug1{info!("IMEF|insert_prediction index {}", index);} let pred_str = match self.pred_options[index] { Some(s) => s, @@ -162,7 +162,7 @@ impl InputTracker { let mut chars = 0; let mut c_iter = tempstr.chars(); loop { - if chars == offset { + if chars == offset + 1 { // +1 to include the original trigger (don't overwrite it) break; } if let Some(c) = c_iter.next() { @@ -182,7 +182,7 @@ impl InputTracker { if let Some(trigger) = self.pred_triggers { if trigger.whitespace && c.is_ascii_whitespace() || trigger.punctuation && c.is_ascii_punctuation() { - // include the trigger + // include the trigger that was found self.line.push(c).expect("IMEF: ran out of space inserting prediction"); chars += 1; break; @@ -212,7 +212,7 @@ impl InputTracker { } pub fn update(&mut self, newkeys: [char; 4]) -> Result<(), xous::Error> { - let debug1= true; + let debug1= false; let mut update_predictor = false; if let Some(ic) = self.input_canvas { if debug1{info!("IMEF: updating input area");} @@ -622,7 +622,6 @@ fn xmain() -> ! { tracker.clear_area().expect("IMEF: can't initially clear areas"); tracker.update(['\u{0000}'; 4]).expect("IMEF: can't setup initial screen arrangement"); - let mut key_queue: Vec = Vec::new(); info!("IMEF: entering main loop"); loop { let envelope = xous::receive_message(imef_sid).unwrap(); diff --git a/services/ime-plugin-api/src/lib.rs b/services/ime-plugin-api/src/lib.rs index 93b4f91cb..c3d6b9f2b 100644 --- a/services/ime-plugin-api/src/lib.rs +++ b/services/ime-plugin-api/src/lib.rs @@ -171,7 +171,7 @@ impl PredictionApi for PredictionPlugin { fn get_prediction(&self, index: u32) -> Result>, xous::Error> { use rkyv::Write; use rkyv::Unarchive; - let debug1 = true; + let debug1 = false; match self.connection { Some(cid) => { let prediction = Prediction { diff --git a/services/ime-plugin-shell/src/main.rs b/services/ime-plugin-shell/src/main.rs index 16b67e8d4..059f0a812 100644 --- a/services/ime-plugin-shell/src/main.rs +++ b/services/ime-plugin-shell/src/main.rs @@ -6,7 +6,7 @@ use core::convert::TryFrom; use log::{error, info}; use heapless::spsc::Queue; -use heapless::consts::U8; +use heapless::consts::U4; use rkyv::Unarchive; use core::pin::Pin; @@ -14,7 +14,7 @@ use rkyv::{archived_value, archived_value_mut}; #[xous::xous_main] fn xmain() -> ! { - let debug1 = true; + let debug1 = false; log_server::init_wait().unwrap(); info!("IME_SH: my PID is {}", xous::process::id()); diff --git a/services/keyboard/src/main.rs b/services/keyboard/src/main.rs index 1ce4a3b4d..8b2addfae 100644 --- a/services/keyboard/src/main.rs +++ b/services/keyboard/src/main.rs @@ -76,8 +76,8 @@ fn map_dvorak(code: RowCol) -> ScanCode { // these are all bugged: row values are swapped on PCB // the F0/tab key also doubles as a secondary power key (can't do UP5K UART rx at same time) - (4, 0) => ScanCode{key: Some(0x11_u8.into()), shift: Some(0x11_u8.into()), hold: Some(0x11_u8.into()), alt: Some(0x11_u8.into())}, // DC1 (F1) - (4, 1) => ScanCode{key: Some(0x12_u8.into()), shift: Some(0x12_u8.into()), hold: Some(0x12_u8.into()), alt: Some(0x12_u8.into())}, // DC2 (F2) + (8, 0) => ScanCode{key: Some(0x11_u8.into()), shift: Some(0x11_u8.into()), hold: Some(0x11_u8.into()), alt: Some(0x11_u8.into())}, // DC1 (F1) + (8, 1) => ScanCode{key: Some(0x12_u8.into()), shift: Some(0x12_u8.into()), hold: Some(0x12_u8.into()), alt: Some(0x12_u8.into())}, // DC2 (F2) (3, 8) => ScanCode{key: Some(0x13_u8.into()), shift: Some(0x13_u8.into()), hold: Some(0x13_u8.into()), alt: Some(0x13_u8.into())}, // DC3 (F3) // the F4/ctrl key also doubles as a power key (3, 9) => ScanCode{key: Some(0x14_u8.into()), shift: Some(0x14_u8.into()), hold: Some(0x14_u8.into()), alt: Some(0x14_u8.into())}, // DC4 (F4) @@ -150,8 +150,8 @@ fn map_qwerty(code: RowCol) -> ScanCode { (8, 9) => ScanCode{key: Some(0xf_u8.into()), shift: Some(0xf_u8.into()), hold: Some(0xf_u8.into()), alt: Some(0xf_u8.into())}, // shift in (blue shift) // the F0/tab key also doubles as a secondary power key (can't do UP5K UART rx at same time) - (4, 0) => ScanCode{key: Some(0x11_u8.into()), shift: Some(0x11_u8.into()), hold: Some(0x11_u8.into()), alt: Some(0x11_u8.into())}, // DC1 (F1) - (4, 1) => ScanCode{key: Some(0x12_u8.into()), shift: Some(0x12_u8.into()), hold: Some(0x12_u8.into()), alt: Some(0x12_u8.into())}, // DC2 (F2) + (8, 0) => ScanCode{key: Some(0x11_u8.into()), shift: Some(0x11_u8.into()), hold: Some(0x11_u8.into()), alt: Some(0x11_u8.into())}, // DC1 (F1) + (8, 1) => ScanCode{key: Some(0x12_u8.into()), shift: Some(0x12_u8.into()), hold: Some(0x12_u8.into()), alt: Some(0x12_u8.into())}, // DC2 (F2) (3, 8) => ScanCode{key: Some(0x13_u8.into()), shift: Some(0x13_u8.into()), hold: Some(0x13_u8.into()), alt: Some(0x13_u8.into())}, // DC3 (F3) // the F4/ctrl key also doubles as a power key (3, 9) => ScanCode{key: Some(0x14_u8.into()), shift: Some(0x14_u8.into()), hold: Some(0x14_u8.into()), alt: Some(0x14_u8.into())}, // DC4 (F4)