@@ -66,7 +66,8 @@ __ProcessExtendedKeyboardKeyStroke(
6666 int prefix ,
6767 int msg ,
6868 unsigned long vk ,
69- unsigned long rawbyte );
69+ unsigned long rawbyte ,
70+ unsigned long scancode );
7071
7172// Process input
7273static int
@@ -1029,7 +1030,8 @@ __ProcessExtendedKeyboardKeyStroke(
10291030 int prefix ,
10301031 int msg ,
10311032 unsigned long vk ,
1032- unsigned long rawbyte )
1033+ unsigned long rawbyte ,
1034+ unsigned long scancode )
10331035{
10341036
10351037/*
@@ -1067,39 +1069,42 @@ __ProcessExtendedKeyboardKeyStroke(
10671069 printk ("VK_PAUSE up\n" );
10681070 }
10691071
1072+ // unsigned long
10701073 if (rawbyte >= 0xFF ){
10711074 goto fail ;
10721075 }
1073- unsigned long scancode = (unsigned long ) (rawbyte & 0x7F );
1076+
1077+ //unsigned long ScanCode = (unsigned long) (rawbyte & 0x7F);
1078+ unsigned long ScanCode = (unsigned long ) scancode ;
10741079
10751080 switch (msg )
10761081 {
10771082 case MSG_SYSKEYDOWN :
1078- if (scancode == 0x4D ) // right
1083+ if (ScanCode == 0x4D ) // right
10791084 {
10801085 if (ctrl_status == TRUE){
1081- ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_RIGHT , VK_RIGHT , scancode );
1086+ ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_RIGHT , VK_RIGHT , ScanCode );
10821087 return 0 ;
10831088 }
10841089 }
1085- if (scancode == 0x48 ) // up
1090+ if (ScanCode == 0x48 ) // up
10861091 {
10871092 if (ctrl_status == TRUE){
1088- ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_UP , VK_UP , scancode );
1093+ ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_UP , VK_UP , ScanCode );
10891094 return 0 ;
10901095 }
10911096 }
1092- if (scancode == 0x50 ) // down
1097+ if (ScanCode == 0x50 ) // down
10931098 {
10941099 if (ctrl_status == TRUE){
1095- ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_DOWN , VK_DOWN , scancode );
1100+ ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_DOWN , VK_DOWN , ScanCode );
10961101 return 0 ;
10971102 }
10981103 }
1099- if (scancode == 0x4B ) // left
1104+ if (ScanCode == 0x4B ) // left
11001105 {
11011106 if (ctrl_status == TRUE){
1102- ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_LEFT , VK_LEFT , scancode );
1107+ ibroker_post_message_to_ds ( MSG_CONTROL_ARROW_LEFT , VK_LEFT , ScanCode );
11031108 return 0 ;
11041109 }
11051110 }
@@ -1115,10 +1120,10 @@ __ProcessExtendedKeyboardKeyStroke(
11151120 break ;
11161121
11171122 case MSG_SYSKEYUP :
1118- //if (scancode == 0x4D)
1123+ //if (ScanCode == 0x4D)
11191124 //{
11201125 // if (ctrl_status == TRUE){
1121- // ibroker_post_message_to_ds( MSG_CONTROL_ARROW_RIGHT, VK_RIGHT, scancode );
1126+ // ibroker_post_message_to_ds( MSG_CONTROL_ARROW_RIGHT, VK_RIGHT, ScanCode );
11221127 // return 0;
11231128 // }
11241129 //}
@@ -2843,13 +2848,15 @@ wmRawKeyEvent(
28432848 }
28442849 Event_LongVK = raw_byte_1 ;
28452850 Event_LongRawByte = raw_byte_1 ;
2851+ Event_LongScanCode = (unsigned long ) (raw_byte_1 & 0x0000007F );
28462852 }
28472853 Status =
28482854 (int ) __ProcessExtendedKeyboardKeyStroke (
28492855 (int ) Prefix ,
28502856 (int ) Event_Message ,
28512857 (unsigned long ) Event_LongVK ,
2852- (unsigned long ) Event_LongRawByte );
2858+ (unsigned long ) Event_LongRawByte ,
2859+ (unsigned long ) Event_LongScanCode );
28532860 return (int ) Status ;
28542861 }
28552862
0 commit comments