[HELP]
Posted: Sat Feb 11, 2023 11:16 am
Hello everyone! I am working on my own operating system just for fun and taking up my time
So far so good! I am actually almost done with the OS. I even got a keyboard driver to work (although not fully done)
I even got a upper case seperate scancode to work. However im having a shift flag issue.
I can get it to detect if the left shift or right shift key is pressed. However im having issues with
detecting if the shift key has been let go. My goal here is to get it so when I hold down the shift
key it prints out the capital letters like most modern computer operating systems do.
Here is my code
Note: this isn't ALL My code but I believe this is the part I'm having issues although if you need
more code to fully understand the issue than please ask thank you!
Any help would be nice!
So far so good! I am actually almost done with the OS. I even got a keyboard driver to work (although not fully done)
I even got a upper case seperate scancode to work. However im having a shift flag issue.
I can get it to detect if the left shift or right shift key is pressed. However im having issues with
detecting if the shift key has been let go. My goal here is to get it so when I hold down the shift
key it prints out the capital letters like most modern computer operating systems do.
Here is my code
Note: this isn't ALL My code but I believe this is the part I'm having issues although if you need
more code to fully understand the issue than please ask thank you!
Code: Select all
if (scancode == 0x2A || scancode == 0x36)
{
shift_hold = true; // Shift flag
print_string("Pressed!");
}
else if (scancode == 0xAA || scancode == 0xB6)
{
shift_hold = false;
print_string("Released!");
}