My first question relates to processing the scan code data I receive from a key press/release. For example:
- * Press the 'G' key
* Receive the scan code 0x34
* Release the 'G' key
* Receive the scan code 0xF0 0x34
--------------------------
My second question relates to where and when to manage the input data from the keyboard. For one thing, I have read that it is not good practice to have too much logic in the ISR, and for another thing, I am guessing in the future I will want to do more sophisticated input handling than just echoing the keyboard input. One approach I have read is to simply take whatever scan code we received, append it to a buffer somewhere, and have a dedicated thread/task that deals with this data separately. Right now I just have a simple kernel, no process/thread support, so at this stage my approach would have to be a bit primitive - just have the kernel main loop to process/output the keyboard input.
Mostly looking for an answer to the first question before I proceed, but also very curious to see people's approach for the actual input processing. Thank you in advance!