Changed enter key position

This commit is contained in:
Christoffer Martinsson 2023-06-21 00:36:03 +02:00
parent 24de6a5109
commit a70cc23906

View File

@ -26,7 +26,7 @@ use crate::NUMBER_OF_KEYS;
use usbd_human_interface_device::page::Keyboard; use usbd_human_interface_device::page::Keyboard;
// Function (Fn) buttons index (need two buttons) // Function (Fn) buttons index (need two buttons)
pub const FN_BUTTONS: [u8; 2] = [37, 40]; pub const FN_BUTTONS: [u8; 3] = [37, 40, 41];
// Button map to HID key (three Function layers) // Button map to HID key (three Function layers)
pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
@ -72,7 +72,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::LeftAlt, // 36 Keyboard::LeftAlt, // 36
Keyboard::NoEventIndicated, // 37 // Fn Keyboard::NoEventIndicated, // 37 // Fn
Keyboard::Space, // 38 Keyboard::Space, // 38
Keyboard::Space, // 39 Keyboard::ReturnEnter, // 39
Keyboard::NoEventIndicated, // 40 // Fn Keyboard::NoEventIndicated, // 40 // Fn
Keyboard::RightAlt, // 41 Keyboard::RightAlt, // 41
], ],
@ -90,7 +90,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::F8, // 8 Keyboard::F8, // 8
Keyboard::F9, // 9 Keyboard::F9, // 9
Keyboard::F10, // 10 Keyboard::F10, // 10
Keyboard::DeleteBackspace, // 11 Keyboard::NoEventIndicated, // 11
Keyboard::LeftControl, // 12 Keyboard::LeftControl, // 12
Keyboard::Keyboard1, // 13 Keyboard::Keyboard1, // 13
Keyboard::Keyboard2, // 14 Keyboard::Keyboard2, // 14
@ -102,7 +102,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::Keyboard8, // 20 Keyboard::Keyboard8, // 20
Keyboard::Keyboard9, // 21 Keyboard::Keyboard9, // 21
Keyboard::Keyboard0, // 22 Keyboard::Keyboard0, // 22
Keyboard::ReturnEnter, // 23 Keyboard::NoEventIndicated, // 23
Keyboard::LeftShift, // 24 Keyboard::LeftShift, // 24
Keyboard::Keyboard6, // 25 Keyboard::Keyboard6, // 25
Keyboard::Keyboard7, // 26 Keyboard::Keyboard7, // 26
@ -118,7 +118,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::LeftAlt, // 36 Keyboard::LeftAlt, // 36
Keyboard::NoEventIndicated, // 37 // Fn Keyboard::NoEventIndicated, // 37 // Fn
Keyboard::DeleteBackspace, // 38 Keyboard::DeleteBackspace, // 38
Keyboard::DeleteBackspace, // 39 Keyboard::ReturnEnter, // 39
Keyboard::NoEventIndicated, // 40// Fn Keyboard::NoEventIndicated, // 40// Fn
Keyboard::RightAlt, // 41 Keyboard::RightAlt, // 41
], ],
@ -136,7 +136,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::LeftGUI, // 8 Keyboard::LeftGUI, // 8
Keyboard::NoEventIndicated, // 9 Keyboard::NoEventIndicated, // 9
Keyboard::CapsLock, // 10 Keyboard::CapsLock, // 10
Keyboard::DeleteBackspace, // 11 Keyboard::NoEventIndicated, // 11
Keyboard::LeftControl, // 12 Keyboard::LeftControl, // 12
Keyboard::NoEventIndicated, // 13 Keyboard::NoEventIndicated, // 13
Keyboard::NoEventIndicated, // 14 Keyboard::NoEventIndicated, // 14
@ -148,7 +148,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::UpArrow, // 20 Keyboard::UpArrow, // 20
Keyboard::RightArrow, // 21 Keyboard::RightArrow, // 21
Keyboard::DeleteForward, // 22 Keyboard::DeleteForward, // 22
Keyboard::ReturnEnter, // 23 Keyboard::NoEventIndicated, // 23
Keyboard::LeftShift, // 24 Keyboard::LeftShift, // 24
Keyboard::F20, // 25 Keyboard::F20, // 25
Keyboard::F21, // 26 Keyboard::F21, // 26
@ -164,7 +164,7 @@ pub const MAP: [[Keyboard; NUMBER_OF_KEYS]; 3] = [
Keyboard::LeftAlt, // 36 Keyboard::LeftAlt, // 36
Keyboard::NoEventIndicated, // 37 // Fn Keyboard::NoEventIndicated, // 37 // Fn
Keyboard::LeftGUI, // 38 Keyboard::LeftGUI, // 38
Keyboard::DeleteBackspace, // 39 Keyboard::ReturnEnter, // 39
Keyboard::NoEventIndicated, // 40 // Fn Keyboard::NoEventIndicated, // 40 // Fn
Keyboard::RightAlt, // 41 Keyboard::RightAlt, // 41
], ],