//-------------------------------------------------------------------------- // // Keyboard matrix header file // //-------------------------------------------------------------------------- // $Archive: /WirelessUSB/WUSB Kits/CY4632 LS KBM RDK/DocSrc/CD_Root/Firmware/Source Code/RDK Keyboard/kdefs.h $ // $Modtime: 7/30/04 9:02a3/24/04 5:27p $ // $Revision: 91.11 $ //-------------------------------------------------------------------------- // // Copyright 2003-2004, Cypress Semiconductor Corporation. // // This software is owned by Cypress Semiconductor Corporation (Cypress) // and is protected by and subject to worldwide patent protection (United // States and foreign), United States copyright laws and international // treaty provisions. Cypress hereby grants to licensee a personal, // non-exclusive, non-transferable license to copy, use, modify, create // derivative works of, and compile the Cypress Source Code and derivative // works for the sole purpose of creating custom software in support of // licensee product to be used only in conjunction with a Cypress integrated // circuit as specified in the applicable agreement. Any reproduction, // modification, translation, compilation, or representation of this // software except as specified above is prohibited without the express // written permission of Cypress. // // Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, // WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // Cypress reserves the right to make changes without further notice to the // materials described herein. Cypress does not assume any liability arising // out of the application or use of any product or circuit described herein. // Cypress does not authorize its products for use as critical components in // life-support systems where a malfunction or failure may reasonably be // expected to result in significant injury to the user. The inclusion of // Cypress’ product in a life-support systems application implies that the // manufacturer assumes all risk of such use and in doing so indemnifies // Cypress against all charges. // // Use may be limited by and subject to the applicable Cypress software // license agreement. // //-------------------------------------------------------------------------- #ifndef _KDEFS_H_ #define _KDEFS_H_ #include "cypdef.h" #include "keyboard.h" //------------------------------------------------------------- Key Matrices typedef enum _DEVICE { DEVICE_1 = 0x01, DEVICE_2 = 0x02, DEVICE_3 = 0x03, DEVICE_4 = 0x04, DEVICE_5 = 0x05, MODIFIER_KEY = 0x80, DEVICE_MASK = 0x7F, NO_DEVICE = 0x7F } DEVICE; #define NOKEY 0x0000 typedef struct _KEY_ELEMENT { DEVICE device; UINT8 scan_code; } KEY_ELEMENT; // Test states typedef enum _TEST_STATE { TEST_OFF = 0, TEST_QUIT = 1, TEST_PANGRAM = 2, TEST_FIXED_CHAR = 4 } TEST_STATE; // Scancode defines for Mouse Emulation Mode #define UP_ARROW_KEY 0x52 #define DOWN_ARROW_KEY 0x51 #define LEFT_ARROW_KEY 0x50 #define RIGHT_ARROW_KEY 0x4F #define PAGE_DOWN_KEY 0x4E #define END_KEY 0x4D #define DELETE_KEY 0x4C #define PAGE_UP_KEY 0x4B #define SCROLL_LOCK_KEY 0x47 #define MOUSE_LEFT_BUTTON 0x20 #define MOUSE_RIGHT_BUTTON 0x40 #ifdef CBK_500_KEYBOARD_MATRIX const KEY_ELEMENT default_keyboard_scan_table[COLUMNS * ROWS] = { // Col 0 {DEVICE_1, 0x0014}, // q {DEVICE_1, 0x0017}, // t {DEVICE_1, 0x001A}, // w {DEVICE_1, 0x001C}, // y {DEVICE_1, 0x0008}, // e {DEVICE_1, 0x0018}, // u {DEVICE_1, 0x0015}, // r {DEVICE_1, 0x000C}, // i // Col 1 {DEVICE_1, 0x005A}, // Keypad 2 Down Arrow {DEVICE_1, 0x0058}, // Kepad Enter {DEVICE_1, 0x005B}, // Keypad 3 Page Dn {DEVICE_1, 0x0044}, // F11 {DEVICE_1, 0x0062}, // Keypad 0 Insert {DEVICE_1, 0x0045}, // F12 {DEVICE_1, 0x0063}, // Keypad . Del {DEVICE_1, 0x0046}, // Print Screen // Col 2 {DEVICE_1, 0x0024}, // 7 & {DEVICE_1, 0x002D}, // _ - {DEVICE_1, 0x0025}, // 8 * {DEVICE_1, 0x002E}, // = + {DEVICE_1, 0x0026}, // 9 ( {DEVICE_1, 0x002A}, // Delete (Backspace) {DEVICE_1, 0x0027}, // 0 ) {DEVICE_1, 0x002b}, // TAB // Col 3 {DEVICE_1, 0x0060}, // Keypad 8 Up Arrow {DEVICE_1, 0x005D}, // Keypad 5 {DEVICE_1, 0x0061}, // Keypad 9 Page Up {DEVICE_1, 0x005E}, // Keypad 6 -> {DEVICE_1, 0x0056}, // Keypad - {DEVICE_1, 0x0057}, // Keypad + {DEVICE_1, 0x005C}, // Keypad 4 Left Arrow {DEVICE_1, 0x0059}, // Keypad 1 End // Col 4 {NO_DEVICE, NOKEY}, {DEVICE_1, 0x0020}, // 3 # {DEVICE_1, 0x0029}, // Escape {DEVICE_1, 0x0021}, // 4 $ {DEVICE_1, 0x001E}, // !1 {DEVICE_1, 0x0022}, // 5 % {DEVICE_1, 0x001F}, // @2 {DEVICE_1, 0x0023}, // 6 ^ // Col 5 {DEVICE_1, 0x003F}, // F6 {DEVICE_1, 0x0043}, // F10 {DEVICE_1, 0x0040}, // F7 {DEVICE_1, 0x0053}, // Num Lock {DEVICE_1, 0x0041}, // F8 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0047}, // Scroll Lock #else {DEVICE_4, 0x0047}, // Scroll Lock #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x0042}, // F9 {DEVICE_1, 0x005F}, // Keypad 7 Home // Col 6 {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0000}, // Index into device 2 table {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0001}, // Index into device 2 table {DEVICE_2, 0x0002}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0003}, // Index into device 2 table // Col 7 {DEVICE_1, 0x0039}, // Caps Lock {DEVICE_1, 0x003B}, // F2 {DEVICE_1, 0x002C}, // Space Bar {DEVICE_1, 0x003C}, // F3 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004E}, // Page Dn #else {DEVICE_5, 0x004E}, // Page Dn #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x003D}, // F4 {DEVICE_1, 0x003A}, // F1 {DEVICE_1, 0x003E}, // F5 // Col 8 {DEVICE_1, 0x0005}, // b {DEVICE_1, 0x0037}, // . > {DEVICE_1, 0x0011}, // n {DEVICE_1, 0x0038}, // ? / {DEVICE_1, 0x0010}, // m #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004C}, // Delete #else {DEVICE_5, 0x004C}, // Delete #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x0036}, // , < {DEVICE_1, 0x0055}, // Keypad * // Col 9 {DEVICE_1 | MODIFIER_KEY, 0x0002}, // Left Shift {DEVICE_1 | MODIFIER_KEY, 0x0020}, // Right Shift {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0004}, // Index into device 2 table {DEVICE_2, 0x0005}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0006}, // Index into device 2 table {DEVICE_1, 0x0065}, // Application // Col 10 {DEVICE_1, 0x0034}, // " ' {DEVICE_1, 0x001D}, // z {DEVICE_1, 0x0035}, // `~ {DEVICE_1, 0x001B}, // x #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004D}, // End #else {DEVICE_5, 0x004D}, // End #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x0006}, // c {NO_DEVICE, NOKEY}, {DEVICE_1, 0x0019}, // v // Col 11 {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0007}, // Index into device 2 table {DEVICE_1 | MODIFIER_KEY, 0x0008}, // Left GUI (Windows) {DEVICE_3, 0x00820x0002}, // System Sleep {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, // Col 12 {DEVICE_1, 0x0007}, // d {DEVICE_1, 0x000D}, // j {DEVICE_1, 0x0009}, // f {DEVICE_1, 0x000E}, // k {DEVICE_1, 0x000A}, // g {DEVICE_1, 0x000F}, // l {DEVICE_1, 0x000B}, // h {DEVICE_1, 0x0033}, // ; : // Col 13 {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {DEVICE_3, 0x00830x0004}, // System Wake {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0001}, // Left Ctrl {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0010}, // Right Ctrl {DEVICE_1, 0x0054}, // Keypad / // Col 14 {DEVICE_1, 0x0012}, // o {DEVICE_1, 0x0028}, // Return (Enter) {DEVICE_1, 0x0013}, // p #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0051}, // Down Arrow #else {DEVICE_5, 0x0051}, // Down Arrow #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x002F}, // [ { {DEVICE_1, 0x0004}, // a {DEVICE_1, 0x0030}, // ] } {DEVICE_1, 0x0016}, // s // Col 15 {DEVICE_1, 0x0031}, // backslash | {DEVICE_1, 0x0048}, // Pause Break {DEVICE_1, 0x004A}, // Home #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0050}, // <- (Left Arrow) {DEVICE_1, 0x0052}, // Up Arrow {DEVICE_1, 0x004F}, // Right Arrow {DEVICE_1, 0x004B}, // Page Up #else {DEVICE_5, 0x0050}, // <- (Left Arrow) {DEVICE_5, 0x0052}, // Up Arrow {DEVICE_5, 0x004F}, // Right Arrow {DEVICE_5, 0x004B}, // Page Up #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x0049}, // Insert // Col 16 {DEVICE_2, 0x0008}, // Index into device 2 table {DEVICE_2, 0x0009}, // Index into device 2 table {DEVICE_2, 0x000A}, // Index into device 2 table {DEVICE_2, 0x000B}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0080}, // Right GUI (Windows) {DEVICE_2, 0x000C}, // Index into device 2 table {DEVICE_2, 0x000D}, // Index into device 2 table // Col 17 {DEVICE_2, 0x000E}, // Index into device 2 table {DEVICE_2, 0x000F}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0004}, // Left Alt {DEVICE_2, 0x0010}, // Index into device 2 table {DEVICE_1 | MODIFIER_KEY, 0x0040}, // Right Alt {DEVICE_2, 0x0011}, // Index into device 2 table {NO_DEVICE, NOKEY}, }; const UINT16 device_2_keyboard_scan_table[] = { 0x00CD, // Play/Pause 0x0225, // WWW Forward 0x0226, // WWW Stop 0x0227, // WWW Refresh 0x00E2, // Mute 0x0194, // My Computer 0x00E9, // Volume Up 0x00B6, // Scan Previous Track 0x0223, // WWW Home 0x0183, // Media Select 0x0224, // WWW Back 0x00B7, // Stop 0x00B5, // Scan Next Track 0x022A, // WWW Favorites 0x0192, // Calculator 0x0221, // WWW Search 0x00EA, // Volume Down 0x018A, // Mail }; // System Sleep key #define SLEEP_COL 0x0B #define SLEEP_ROW_MASK 0x08 // Test mode defines #ifdef KEYBOARD_TEST_MODES // Left Alt and Right Alt keys #define ALT_COL 0x11 #define ALT_ROW_MASK 0x28 // Left Ctrl and Right Ctrl keys #define CTRL_COL 0x0D #define CTRL_ROW_MASK 0x50 // F1 key #define F1_COL 0x07 #define F1_ROW_MASK 0x40 // F2 key #define F2_COL 0x07 #define F2_ROW_MASK 0x02 // F3 key #define F3_COL 0x07 #define F3_ROW_MASK 0x08 // Escape key #define ESC_COL 0x04 #define ESC_ROW_MASK 0x04 #ifdef PANGRAM_TEST_MODE // The following structure contains the pangram for the pangram test mode. // A pangram is a sentence that contains all letters of the alphabet (at least once). // The table contains the index values into the default_keyboard_scan_table // and not the actual scancodes. // "a quick brown fox jumps over the lazy dog.<cr>" const UINT8 sentence_table[] = { 117, 58, // a 0, 5, 7, 85, 99, 58, // quick 64, 6, 112, 2, 66, 58, // brown 98, 112, 83, 58, // fox 97, 5, 68, 114, 119, 58, // jumps 112, 87, 4, 6, 58, // over 1, 102, 4, 58, // the 101, 117, 81, 3, 58, // lazy 96, 112, 100, 65, 113, // dog.<cr> }; #else //PANGRAM_TEST_MODE // "wirelessusb <bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>" const UINT8 sentence_table[] = { 2, 7, 6, 4, 101, 4, 119, 119, 5, 119, 64, // wirelessusb 58, 21, 21, 21, 21, 21, // <sp><bs><bs><bs><bs><bs> 21, 21, 21, 21, 21, 21, 21 // <bs><bs><bs><bs><bs><bs><bs> }; #endif //PANGRAM_TEST_MODE #define X_INDEX 83 // x #endif //KEYBOARD_TEST_MODES #else //CBK_500_KEYBOARD_MATRIX // USB7 Keyboard Matrix const KEY_ELEMENT default_keyboard_scan_table[COLUMNS * ROWS] = { // Col 0 {DEVICE_1, 0x0029}, // Escape {DEVICE_1, 0x002b}, // TAB {DEVICE_1, 0x0035}, // `~ {DEVICE_1, 0x001E}, // !1 {DEVICE_1, 0x0014}, // q {DEVICE_1, 0x0004}, // a {DEVICE_1, 0x001D}, // z {DEVICE_1, 0x0031}, // backslash | **NOT EXIST** // Col 1 {DEVICE_1, 0x003A}, // F1 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004E}, // Page Dn #else {DEVICE_5, 0x004E}, // Page Dn #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x003B}, // F2 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004B}, // Page Up #else {DEVICE_5, 0x004B}, // Page Up #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x001F}, // @2 {DEVICE_1, 0x001A}, // w {DEVICE_1, 0x001B}, // x {DEVICE_1, 0x0016}, // s // Col 2 {DEVICE_1, 0x003C}, // F3 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004C}, // Delete #else {DEVICE_5, 0x004C}, // Delete #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x003D}, // F4 {DEVICE_1, 0x0049}, // Insert {DEVICE_1, 0x0061}, // Keypad 9 Page Up {DEVICE_1, 0x005E}, // Keypad 6 -> {DEVICE_1, 0x0063}, // Keypad . Del {DEVICE_1, 0x005B}, // Keypad 3 Page Dn // Col 3 {DEVICE_1, 0x0020}, // 3 # {DEVICE_1, 0x0008}, // e {DEVICE_1, 0x0025}, // 8 * {DEVICE_1, 0x000C}, // i {DEVICE_1, 0x000E}, // k {DEVICE_1, 0x0007}, // d {DEVICE_1, 0x0036}, // , < {DEVICE_1, 0x0006}, // c // Col 4 {DEVICE_1, 0x0021}, // 4 $ {DEVICE_1, 0x0017}, // t {DEVICE_1, 0x0022}, // 5 % {DEVICE_1, 0x0015}, // r {DEVICE_1, 0x0009}, // f {DEVICE_1, 0x000A}, // g {DEVICE_1, 0x0005}, // b {DEVICE_1, 0x0019}, // v // Col 5 {DEVICE_1, 0x0023}, // 6 ^ {DEVICE_1, 0x0018}, // u {DEVICE_1, 0x0024}, // 7 & {DEVICE_1, 0x001C}, // y {DEVICE_1, 0x000B}, // h {DEVICE_1, 0x000D}, // j {DEVICE_1, 0x0010}, // m {DEVICE_1, 0x0011}, // n // Col 6 {DEVICE_1, 0x003E}, // F5 {DEVICE_1, 0x002A}, // Delete (Backspace) {DEVICE_1, 0x003F}, // F6 {DEVICE_1, 0x002E}, // = + {DEVICE_1, 0x0030}, // ] } {DEVICE_1, 0x0031}, // | backslash {DEVICE_1, 0x0028}, // Return (Enter) #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0050}, // <- #else {DEVICE_5, 0x0050}, // <- #endif // MOUSE_EMULATION_MODE // Col 7 {DEVICE_1, 0x0040}, // F7 {DEVICE_1, 0x002D}, // _ - {DEVICE_1, 0x0041}, // F8 {DEVICE_1, 0x0026}, // 9 ( {DEVICE_1, 0x0012}, // o {DEVICE_1, 0x002F}, // [ { {DEVICE_1, 0x0037}, // . > {DEVICE_1, 0x000F}, // l // Col 8 {DEVICE_1, 0x0042}, // F9 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0051}, // Down Arrow #else {DEVICE_5, 0x0051}, // Down Arrow #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x0043}, // F10 {DEVICE_1, 0x0027}, // 0 ) {DEVICE_1, 0x0033}, // ; : {DEVICE_1, 0x0034}, // " ' {DEVICE_1, 0x0013}, // p {DEVICE_1, 0x0038}, // ? / // Col 9 {DEVICE_1, 0x0044}, // F11 #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004D}, // End #else {DEVICE_5, 0x004D}, // End #endif // MOUSE_EMULATION_MODE {DEVICE_1, 0x0045}, // F12 {DEVICE_1, 0x004A}, // Home {DEVICE_1, 0x0060}, // Keypad 8 Up Arrow {DEVICE_1, 0x005D}, // Keypad 5 {DEVICE_1, 0x0062}, // Keypad 0 Insert {DEVICE_1, 0x005A}, // Keypad 2 Down Arrow // Col 10 (0x0A) {DEVICE_1, 0x0046}, // Print Screen {DEVICE_1, 0x0055}, // Keypad * {DEVICE_1, 0x0065}, // Application {DEVICE_1, 0x0054}, // Keypad / {DEVICE_1, 0x005F}, // Keypad 7 Home {DEVICE_1, 0x005C}, // Keypad 4 Left Arrow {DEVICE_1, 0x0059}, // Keypad 1 End {DEVICE_1, 0x0057}, // Keypad + // Col 11 (0x0B) #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0047}, // Scroll Lock #else {DEVICE_4, 0x0047}, // Scroll Lock #endif // MOUSE_EMULATION_MODE {DEVICE_2, 0x0000}, // Index into device 2 table {DEVICE_1, 0x0058}, // Kepad Enter {DEVICE_1 | MODIFIER_KEY, 0x0008}, // Left GUI (Windows) {DEVICE_2, 0x0001}, // Index into device 2 table {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, // Col 12 (0x0C) {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0002}, // Index into device 2 table {DEVICE_3, 0x0082}, // suspend PWRKEY 0 {DEVICE_2, 0x0003}, // Index into device 2 table {DEVICE_1 | MODIFIER_KEY, 0x0002}, // Left Shift {DEVICE_2, 0x0004}, // Index into device 2 table {DEVICE_1 | MODIFIER_KEY, 0x0020}, // Right Shift {DEVICE_2, 0x0005}, // Index into device 2 table // Col 13 (0x0D) {DEVICE_1, 0x0056}, // Keypad - {DEVICE_2, 0x0006}, // Index into device 2 table {DEVICE_1, 0x0053}, // Num Lock {DEVICE_2, 0x0007}, // Index into device 2 table {DEVICE_2, 0x0008}, // Index into device 2 table {DEVICE_1 | MODIFIER_KEY, 0x0004}, // Left Alt {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0040}, // Right Alt // Col 14 (0x0E) #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x004F}, // Right Arrow #else {DEVICE_5, 0x004F}, // Right Arrow #endif // MOUSE_EMULATION_MODE {DEVICE_1 | MODIFIER_KEY, 0x0080}, // Right GUI (Windows) {DEVICE_1, 0x002C}, // Space Bar {NO_DEVICE, NOKEY}, {DEVICE_2, 0x0009}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_2, 0x000A}, // Index into device 2 table {NO_DEVICE, NOKEY}, // Col 15 (0x0F) {DEVICE_2, 0x000B}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_2, 0x000C}, // Index into device 2 table {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0001}, // Left Ctrl {NO_DEVICE, NOKEY}, {DEVICE_1 | MODIFIER_KEY, 0x0010}, // Right Ctrl {DEVICE_2, 0x000D}, // Index into device 2 table // Col 16 (0x10) {DEVICE_1, 0x0048}, // Pause Break {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, #ifndef MOUSE_EMULATION_MODE {DEVICE_1, 0x0052}, // Up Arrow #else {DEVICE_5, 0x0052}, // Up Arrow #endif // MOUSE_EMULATION_MODE {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, // Col 17 (0x11) {NO_DEVICE, NOKEY}, {DEVICE_1, 0x0039}, // Caps Lock {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, {NO_DEVICE, NOKEY}, }; const UINT16 device_2_keyboard_scan_table[] = { 0x00EA, // volume dec HOTKEY 9 0x00E2, // mute HOTKEY 7 0x0223, // internet HOTKEY 3 0x0221, // info HOTKEY 1 // Windows Explorer search 0x008F, // game HOTKEY ?? // "Media Select Games" from "USB HID Usage Table" v1.1 Pg. 57 0x018A, // email reader HOTKEY 4 0x00CD, // play HOTKEY 6 0x00CD, // pause HOTKEY 6 0x00E9, // volume inc HOTKEY 8 0x00B8, // eject HOTKEY ?? // "Eject" from "USB HID Usage Table" v1.1 Pg. 58 0x022A, // shortcut HOTKEY ?? // "AC Bookmarks" from "USB HID Usage Table" v1.1 Pg. 62 0x00B5, // next HOTKEY 12 0x00B6, // prev HOTKEY 11 0x00B7, // stop HOTKEY 5 }; // System Sleep key #define SLEEP_COL 0x0C #define SLEEP_ROW_MASK 0x04 // Test mode defines #ifdef KEYBOARD_TEST_MODES // Left Alt and Right Alt keys #define ALT_COL 0x0D #define ALT_ROW_MASK 0xA0 // Left Ctrl and Right Ctrl keys #define CTRL_COL 0x0F #define CTRL_ROW_MASK 0x50 // F1 key #define F1_COL 0x01 #define F1_ROW_MASK 0x01 // F2 key #define F2_COL 0x01 #define F2_ROW_MASK 0x04 // F3 key #define F3_COL 0x02 #define F3_ROW_MASK 0x01 // Escape key #define ESC_COL 0x00 #define ESC_ROW_MASK 0x01 #ifdef PANGRAM_TEST_MODE // The following structure contains the pangram for the pangram test mode. // A pangram is a sentence that contains all letters of the alphabet (at least once). // The table contains the index values into the default_keyboard_scan_table // and not the actual scancodes. // "a quick brown fox jumps over the lazy dog.<cr>" const UINT8 sentence_table[] = { 5, 114, // a 4, 41, 27, 31, 28, 114, // quick 38, 35, 60, 13, 47, 114, // brown 36, 60, 14, 114, // fox 45, 41, 46, 70, 15, 114, // jumps 60, 39, 25, 35, 114, // over 33, 44, 25, 114, // the 63, 5, 6, 43, 114, // lazy 29, 60, 37, 62, 54 // dog.<cr> }; #else //PANGRAM_TEST_MODE // "wirelessusb <bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>" const UINT8 sentence_table[] = { 13, 27, 35, 25, 63, 25, 15, 15, 41, 15, 38, // wirelessusb 114, 49, 49, 49, 49, 49, // <sp><bs><bs><bs><bs><bs> 49, 49, 49, 49, 49, 49, 49 // <bs><bs><bs><bs><bs><bs><bs> }; #endif //PANGRAM_TEST_MODE #define X_INDEX 14 // x #endif //KEYBOARD_TEST_MODES #endif //CBK_500_KEYBOARD_MATRIX #endif // _KDEFS_H_