Skip to content

Commit 5d4f440

Browse files
committed
Add mac layout
swap left ctrl and left alt Signed-off-by: Daniel Schaefer <[email protected]>
1 parent af96787 commit 5d4f440

File tree

1 file changed

+15
-0
lines changed
  • framework_lib/src/chromium_ec

1 file changed

+15
-0
lines changed

framework_lib/src/chromium_ec/mod.rs

+15
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,21 @@ impl CrosEc {
357357
self.remap_key(6, 15, 0x0014)
358358
}
359359

360+
pub fn remap_mac(&self) -> EcResult<()> {
361+
// CTRL => FN
362+
// self.remap_key()
363+
// FN => ALT
364+
// self.remap_key(, 0x0011)
365+
// WIN => WIN
366+
// No Op
367+
368+
// CTRL => ALT
369+
self.remap_key(1, 12, 0x0011)?;
370+
// ALT => CTRL
371+
self.remap_key(1, 3, 0x0014)?;
372+
Ok(())
373+
}
374+
360375
pub fn remap_key(&self, row: u8, col: u8, scanset: u16) -> EcResult<()> {
361376
let _current_matrix = EcRequestUpdateKeyboardMatrix {
362377
num_items: 1,

0 commit comments

Comments
 (0)