summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
diff options
context:
space:
mode:
authorjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-03 08:52:39 +0000
committerjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-03 08:52:39 +0000
commitaa79b0b3799e95bc21e0df32a135cc5a4d749e4b (patch)
treed1ee81cebff21475e8f052aa061716bfedd1f807 /MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
parent4058e906c15600ee6229335c316cb85fcbd687b3 (diff)
downloadedk2-aa79b0b3799e95bc21e0df32a135cc5a4d749e4b.tar.gz
edk2-aa79b0b3799e95bc21e0df32a135cc5a4d749e4b.tar.bz2
edk2-aa79b0b3799e95bc21e0df32a135cc5a4d749e4b.zip
Global variables have been moved backward ahead of functions.
Only a few cases were left due to its module structure. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6816 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
index 36c80ce470..9af221daad 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
@@ -130,40 +130,6 @@ UINT8 KeyboardLayoutTable[USB_KEYCODE_MAX_MAKE + 8][5] = {
{EfiKeyA3, 0, 0, EFI_RIGHT_LOGO_MODIFIER, 0}, // 0xe7
};
-/**
- Initialize KeyConvertionTable by using default keyboard layout.
-
- @param UsbKeyboardDevice The USB_KB_DEV instance.
- @retval None.
-
-**/
-VOID
-EFIAPI
-LoadDefaultKeyboardLayout (
- IN USB_KB_DEV *UsbKeyboardDevice
- )
-{
- UINTN Index;
- EFI_KEY_DESCRIPTOR *KeyDescriptor;
-
- //
- // Construct KeyConvertionTable by default keyboard layout
- //
- KeyDescriptor = &UsbKeyboardDevice->KeyConvertionTable[0];
-
- for (Index = 0; Index < (USB_KEYCODE_MAX_MAKE + 8); Index++) {
- KeyDescriptor->Key = (EFI_KEY) KeyboardLayoutTable[Index][0];
- KeyDescriptor->Unicode = KeyboardLayoutTable[Index][1];
- KeyDescriptor->ShiftedUnicode = KeyboardLayoutTable[Index][2];
- KeyDescriptor->AltGrUnicode = 0;
- KeyDescriptor->ShiftedAltGrUnicode = 0;
- KeyDescriptor->Modifier = KeyboardLayoutTable[Index][3];
- KeyDescriptor->AffectedAttribute = KeyboardLayoutTable[Index][4];
-
- KeyDescriptor++;
- }
-}
-
//
// EFI_KEY to USB Scan Code convertion table
//
@@ -330,6 +296,40 @@ KB_MODIFIER KB_Mod[8] = {
};
+/**
+ Initialize KeyConvertionTable by using default keyboard layout.
+
+ @param UsbKeyboardDevice The USB_KB_DEV instance.
+ @retval None.
+
+**/
+VOID
+EFIAPI
+LoadDefaultKeyboardLayout (
+ IN USB_KB_DEV *UsbKeyboardDevice
+ )
+{
+ UINTN Index;
+ EFI_KEY_DESCRIPTOR *KeyDescriptor;
+
+ //
+ // Construct KeyConvertionTable by default keyboard layout
+ //
+ KeyDescriptor = &UsbKeyboardDevice->KeyConvertionTable[0];
+
+ for (Index = 0; Index < (USB_KEYCODE_MAX_MAKE + 8); Index++) {
+ KeyDescriptor->Key = (EFI_KEY) KeyboardLayoutTable[Index][0];
+ KeyDescriptor->Unicode = KeyboardLayoutTable[Index][1];
+ KeyDescriptor->ShiftedUnicode = KeyboardLayoutTable[Index][2];
+ KeyDescriptor->AltGrUnicode = 0;
+ KeyDescriptor->ShiftedAltGrUnicode = 0;
+ KeyDescriptor->Modifier = KeyboardLayoutTable[Index][3];
+ KeyDescriptor->AffectedAttribute = KeyboardLayoutTable[Index][4];
+
+ KeyDescriptor++;
+ }
+}
+
/**
Uses USB I/O to check whether the device is a USB Keyboard device.