diff --git a/02_Architecture/09_Add_Keyboard_Support.md b/02_Architecture/09_Add_Keyboard_Support.md index f4a5234..bd5e329 100644 --- a/02_Architecture/09_Add_Keyboard_Support.md +++ b/02_Architecture/09_Add_Keyboard_Support.md @@ -21,7 +21,7 @@ Whenever a key is pressed or released the keyboard sends some data to us via the There are three different sets of scancodes available (1, 2 and 3). Sets 1 and 2 are the most widely supported, set 3 was a later addition and is rare to see in the wild. Set 1 was the first, and a lot of software at the time was hardcoded to support it. This prevented an interesting problem when set 2 was introduced later on, and then standardized as being the default set for a keyboard. The solution was to keep set 2 as the default, but the ps/2 controller will translate set 2 scancodes into set 1 scancodes. To ensure compatability with older software, and confuse future os developers, this feature is enabled by default. -The scancode that is generated when a key is pressed is called the **make** code, while the scancode generated by a key release is callee the **break** code. +The scancode that is generated when a key is pressed is called the **make** code, while the scancode generated by a key release is called the **break** code. In order to develop our keyboard driver we'll need to do the following: diff --git a/02_Architecture/11_Keyboard_Driver_Implementation.md b/02_Architecture/11_Keyboard_Driver_Implementation.md index 83a92a8..ae43c2f 100644 --- a/02_Architecture/11_Keyboard_Driver_Implementation.md +++ b/02_Architecture/11_Keyboard_Driver_Implementation.md @@ -272,7 +272,7 @@ char shifted_chars[] = { char get_printable_char(key_event key) { - if (key.status_mask & CTRL_MASK || key.caps_lock) + if (key.status_mask & SHIFT_MASK || key.caps_lock) return shifted_chars[key.code]; else return lower_chars[key.code]; @@ -288,7 +288,7 @@ Using the switch statement approach looks like the following: ```c char get_printable_char(key_event key) { - const bool shifted = key.status_mask & CTRL_MASK || key.caps_lock; + const bool shifted = key.status_mask & SHIFT_MASK || key.caps_lock; switch (key.code) { case KEY_A: