/* Change wch = char_keys[to_char_keys_index(scan_code)]; to wch = modified_get_key(scan_code); Change: wch = shift_keys[to_char_keys_index(scan_code)]; to modified_get_shift_key(scan_code); */ wchar_t Snum_row[] = L"~!@#$%^&*()_+"; wchar_t Sqwer_row[] = L"QWERTYUIOP{}|"; wchar_t Sasdf_row[] = L"ASDFGHJKL:\""; wchar_t Szxcv_row[] = L"ZXCVBNM<>?"; wchar_t modified_get_key(unsigned int keycode) { wchar_t return_char = '\0'; if (keycode >= KEY_1 && keycode <= KEY_EQUAL) // keycodes 2-13: US keyboard: 1, 2, ..., 0, -, = { return_char = num_row[keycode - KEY_1]; } if (keycode >= KEY_Q && keycode <= KEY_RIGHTBRACE) // keycodes 16-27: q, w, ..., [, ] { return_char = qwer_row[keycode - KEY_Q]; } if (keycode >= KEY_A && keycode <= KEY_GRAVE) // keycodes 30-41: a, s, ..., ', ` { return_char = asdf_row[keycode - KEY_A]; } if (keycode >= KEY_Z && keycode <= KEY_SLASH) // keycodes 43-53: \, z, ..., ., / { return_char = zxcv_row[keycode - KEY_Z]; } if(keycode == KEY_BACKSLASH) return_char = '\\'; return return_char; } wchar_t Snum_row[] = L"~!@#$%^&*()_+"; wchar_t Sqwer_row[] = L"QWERTYUIOP{}|"; wchar_t Sasdf_row[] = L"ASDFGHJKL:\""; wchar_t Szxcv_row[] = L"ZXCVBNM<>?"; wchar_t modified_get_shift_key(unsigned int keycode) { wchar_t return_char = '\0'; if (keycode >= KEY_1 && keycode <= KEY_EQUAL) // keycodes 2-13: US keyboard: 1, 2, ..., 0, -, = { return_char = Snum_row[keycode - KEY_1]; } if (keycode >= KEY_Q && keycode <= KEY_RIGHTBRACE) // keycodes 16-27: q, w, ..., [, ] { return_char = Sqwer_row[keycode - KEY_Q]; } if (keycode >= KEY_A && keycode <= KEY_GRAVE) // keycodes 30-41: a, s, ..., ', ` { return_char = Sasdf_row[keycode - KEY_A]; } if (keycode >= KEY_Z && keycode <= KEY_SLASH) // keycodes 43-53: \, z, ..., ., / { return_char = Szxcv_row[keycode - KEY_Z]; } if(keycode == KEY_BACKSLASH) return_char = '\\'; return return_char; }