cancel
Showing results for 
Search instead for 
Did you mean: 

Missing ESC key code in USB HID_KEYBRD_Key table array

Robmar
Senior III

The Escape key was mapped to 0x00 in the USB HID code, I added it and it works fine but I'm curious to know why it was absent?  Bug/oversight, another method used for Escape key detection?

 

 

#ifdef QWERTY_KEYBOARD
static  const  uint8_t  HID_KEYBRD_Key[] =
{
  '\0',  '`',  '1',  '2',  '3',  '4',  '5',  '6',
  '7',  '8',  '9',  '0',  '-',  '=',  '\0', '\r',
  '\t',  'q',  'w',  'e',  'r',  't',  'y',  'u',
  'i',  'o',  'p',  '[',  ']',  '\\',
  '\0',  'a',  's',  'd',  'f',  'g',  'h',  'j',
  'k',  'l',  ';',  '\'', '\0', '\n',
  '\0',  '\0', 'z',  'x',  'c',  'v',  'b',  'n',
  'm',  ',',  '.',  '/',  '\0', '\0',
  '\0',  '\0', '\0', ' ', '\0', '\0', '\0', '\0',
  '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
  '\0',  '\0', '\0', '\0', '\0', '\r', '\0', '\0',
  '\0', '\0', '\0', '\0', '\0', '\0',
  '\0',  '\0', '7',  '4',  '1',
  '\0',  '/',  '8',  '5',  '2',
  '0',   '*',  '9',  '6',  '3',
  '.',   '-',  '+',  '\0', '\n', '\0', '\e', '\0', '\0', '\0', '\0',	/* Modification - changed \0 to \e for Escape key detection */
  '\0',  '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
  '\0', '\0', '\0', '\0'
};

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hi @Robmar 

We can confirm HOST MW for HID class will be updated.

STM32CubeH7/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src/usbh_hid_keybd.c at d76ccdf6165bdf31d3718ae4722aa23bd15cc582 · STMicroelectronics/STM32CubeH7 (github.com)

Internal ticket is submitted to MW team: 190619

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
FBL
ST Employee

Hi @Robmar 

We can confirm HOST MW for HID class will be updated.

STM32CubeH7/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src/usbh_hid_keybd.c at d76ccdf6165bdf31d3718ae4722aa23bd15cc582 · STMicroelectronics/STM32CubeH7 (github.com)

Internal ticket is submitted to MW team: 190619

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.