@2018-08-08
小記
鍵盤實現時,在發送鍵值時, 函數 GUI_SendKeyMsg(GUI_KEY_BACKSPACE, Pressed) 的參數 Pressed 在按鍵按下狀態的 case 語句后無 break,此方法參考至官方的模擬器中的鍵盤實例,加上 break 會導致鍵盤無響應結果
1 case ID_BUTTON_13: // Notifications sent by '<- -Button' 2 switch(NCode) { 3 case WM_NOTIFICATION_CLICKED: 4 // USER START (Optionally insert code for reacting on notification message) 5 6 Pressed = 1; 7 8 // USER END 9 case WM_NOTIFICATION_RELEASED: 10 // USER START (Optionally insert code for reacting on notification message) 11 12 GUI_SendKeyMsg(GUI_KEY_BACKSPACE, Pressed); 13 14 // USER END 15 break; 16 // USER START (Optionally insert additional code for further notification handling) 17 // USER END 18 } 19 break;