Index: aktousb/code/keyboard.hex
===================================================================
--- aktousb/code/keyboard.hex	(revision d082564c6e937687f72c28d1e742f99c032c90e5)
+++ aktousb/code/keyboard.hex	(revision cbc34d1ee7fc344d958f8159688a78597b55072d)
@@ -1,3 +1,3 @@
-:10000000A7C089C2CAC0BFC0BEC0BDC0BCC0BBC043
+:10000000A7C0A3C2C1C0BFC0BEC0BDC0BCC0BBC032
 :10001000BAC0B9C0B8C0B7C0B6C0B5C0B4C0B3C02C
 :10002000B2C0B1C0B0C0351E1F2021222324252616
@@ -7,5 +7,5 @@
 :100060003800635F60612C2A2B5828294C0000005F
 :10007000560052514F503A3B3C3D3E3F4041424377
-:1000800082835455577500003900000000000000BD
+:1000800076775455577500003900000000000000D5
 :10009000000000000000022000010440088005016B
 :1000A0000906A101050719E029E7150025017501D9
@@ -21,143 +21,146 @@
 :100140002101010001223F000705810308000A0088
 :1001500011241FBECFE5D4E0DEBFCDBF10E0A0E686
-:10016000B0E0E4E0FAE002C005900D92A436B107D9
-:10017000D9F710E0A4E6B0E001C01D92AC3AB10797
-:10018000E1F728D13DC43CCF8C9A949884E591E066
-:100190000197F1F7949A8C9808951F920F920FB6D9
-:1001A0000F9211242F933F938F939F9383992CC089
-:1001B00080917200882339F481E08093720010925C
-:1001C00074001092730030917400383090F4849968
-:1001D0000DC02091730080E890E0032E02C0959539
-:1001E00087950A94E2F7282B209373003F5F3093A2
-:1001F000740080917400883038F010927200109270
-:10020000740081E0809375009F918F913F912F91B1
-:100210000F900FBE0F901F901895839BFECF80EA22
-:100220008A95F1F7B1DF10927500809173000895FF
-:10023000809175008823E1F3F0DF08951092720039
-:1002400010927300109274008B98839A85B788601F
-:1002500085BF85B78B7F85BF8BB780688BBF789450
-:1002600093DF0895282F30E0F901EA5DFF4F4491B4
-:100270008056883010F090E004C02A5C3F4FF901AE
-:100280009491442389F080916100883068F4E82FCC
-:10029000F0E0E859FF4F40838F5F8093610049335E
-:1002A00019F481E08093660080916800982B909308
-:1002B00068000895282F30E0F901EA5DFF4F44916E
-:1002C0008056883010F030E004C02A5C3F4FF901BE
-:1002D0003491493381F480916100883058F5E82FDA
-:1002E000F0E0E859FF4F40838F5F8093610081E029
-:1002F000809366001FC04423E9F02091610092E0E2
-:1003000015C0E92FF0E0E859FF4F8081841769F4A8
-:1003100007C0E92FF0E0E859FF4F818180839F5F9C
-:100320009730B8F310926F0021509F5F921748F3F7
-:1003300020936100309580916800382330936800E5
-:100340000895FC0188E690E09093910080939000DE
-:1003500080818076803271F58181813011F488E06E
-:100360000895893049F486819781019719F581E0D4
-:10037000809364008FEF0895823019F487E690E04F
-:1003800013C08A3029F483818093670080E0089548
-:10039000833031F48381882369F4109260000895DA
-:1003A0008B3041F480E690E0909391008093900030
-:1003B00081E0089580E00895FC0180916400882325
-:1003C00029F0613019F480818093650010926400F7
-:1003D00081E00895EF92FF920F931F93CF93DF93E5
-:1003E0002FE088E190E00FB6F894A89581BD0FBE8C
-:1003F00021BD84E083BF8E9A88E0E8E6F0E0DF016B
-:100400001D928A95E9F7A8D119DF789400E0FF24BE
-:1004100010E0C0E1D0E0EE24E394A895AAD1809149
-:10042000750080917500882369F0F7DE982F969506
-:1004300080FD04C0892F16DF969A06C0892F3ADF07
-:10044000FF24F394002361F08091810084FD02C0B9
-:1004500001E006C088E690E068E0B0D2969800E03F
-:1004600008B600FEDACFE8BE80916600882329F145
-:10047000219719F5109266004091610022E030E06A
-:1004800013C0F901E859FF4F8081893359F404C042
-:100490002F5F3F4F8181819327303105CCF310923C
-:1004A0006F0041502F5F3F4F842F90E0281739078E
-:1004B00044F340936100C0E1D0E0812F8F5F85302D
-:1004C00010F01450AACF10916700FF2009F4A5CFB7
-:1004D0008091810084FFA1CF88E690E068E06ED231
-:1004E000FF249BCFA82FB92F80E090E041E050EA95
-:1004F000609530E009C02D9182279795879510F07F
-:1005000084279527305EC8F36F5FA8F30895EADF6C
-:100510008D939D930895CF93CFB7CF93DF93C395DA
-:10052000859BE9F7859B0BC0859B09C0859B07C010
-:10053000859B05C0859B03C0859B01C08BC06F93C5
-:10054000C0918F00DD27CA56DF4F2F9365E5859B4D
-:1005500003C02F916F91E6CF0F931F934F9320E02D
-:1005600040E15F9300B3047205FB27F93F9350E02D
-:100570003BE039C0147240642F77012F5F5F1EC0CB
-:10058000406810B314722F7752501FC0406400B3FC
-:100590002F770472D1F15F5F00C023C0406210B3B7
-:1005A0002F77147291F15F5F00C025C0047210278D
-:1005B000515012F45D5F0000115027952C3F10B38D
-:1005C000C8F614720127015027952C3FC8F6422720
-:1005D000499300B3047210274F73115027952C3F95
-:1005E000A8F64695469510B3147279F0012701508C
-:1005F00027952C3F98F66B5A60F3315000B3B0F654
-:1006000000C010E41ABF002719C03B503195C31B2E
-:10061000D04010E41ABF0881033C09F10B34F9F013
-:1006200020918D001981110F1213EDCF4A81441FC3
-:10063000093651F10D3211F0013E29F70093940073
-:100640003F915F914F911F910F912F916F91CAB779
-:10065000C6FD65CFDF91CF91CFBFCF911895209187
-:100660009400222369F310919200112391F5343004
-:1006700092F13093920020938E0010918F003BE016
-:10068000311B30938F0027C00091920001300CF590
-:100690000AE54F7049F43091620034FD1DC00093AB
-:1006A0006200C6E7D0E01CC03091810034FD14C068
-:1006B00000938100C2E8D0E013C0052710E000C01D
-:1006C000000002BB1AC0052710E0221F1DC010E069
-:1006D00021C04AE502C032ED432FC4E1D0E032E050
-:1006E00011B31462959A02B311BB54E220E865E39A
-:1006F00020FF052702BB279517951C3FF0F666954E
-:10070000B8F7B1F720FF052702BB279517951C3FC7
-:10071000D0F62795179517FF052700001C3F02BB51
-:10072000B0F629913A9519F70B7D10919300110FAE
-:10073000C651D04002BB11F010938D0010E41ABFD7
-:10074000006211B31B7D402F4B7D54E05A95F1F7A9
-:1007500002BB11BB42BB74CF85B7836085BF8BB72B
-:1007600080648BBF8BE4809382008AE58093810054
-:1007700008951F93CF93DF9360919200635067FDBC
-:10078000C2C080918F00CCE0D0E0C81BD109CA560E
-:10079000DF4F80918E008D3209F0A3C0683009F0E0
-:1007A000B0C083EC809376008AE58093620010925B
-:1007B00070008881807639F0CE01C3DD282F8F3F0D
-:1007C00009F47EC084C09A8110927F0089818823B9
-:1007D00021F41092800022E06CC0853019F49093CF
-:1007E000930066C0863009F04FC08B81813041F4A0
-:1007F0008BE191E0909391008093900022E140C0C2
-:10080000823041F48DE291E09093910080939000CA
-:1008100022E236C08330F9F48A81882341F48DEDD9
-:1008200090E0909391008093900024E029C0813063
-:1008300041F481EE90E0909391008093900024E247
-:100840001FC08230E1F485E091E0909391008093A5
-:10085000900026E115C0813241F48FE391E090933E
-:1008600091008093900029E00BC0823241F48EE920
-:1008700090E090939100809390002FE301C020E0DE
-:1008800080E48093700023C0883021F421E085E962
-:1008900090E011C0893019F49093950009C08A3016
-:1008A00011F421E006C08B3019F48BE480938200B0
-:1008B00020E08FE790E0909391008093900007C034
-:1008C000888187FD2E8180E88093700006C08F812B
-:1008D000882319F48E81821708F0822F8093630099
-:1008E00010C08091700087FF0CC0CE0165DD8F3F86
-:1008F00021F48EE18093620004C0882311F01092ED
-:100900006300109292008091620084FF49C0809140
-:1009100063008F3F09F444C0182F893008F018E0B5
-:10092000811B809363008091760098E889278093EB
-:100930007600112341F12091900030919100809137
-:10094000700086FF0DC0A7E7B0E080E090E0F901FD
-:10095000E80FF91FE491ED9301961817C1F708C04D
-:10096000912FD901E7E7F0E08D9181939150E1F764
-:100970001150812F90E01F5F0196820F931F90937B
-:1009800091008093900087E790E0612FC0DD612F98
-:100990006C5F6C3019F08FEF80936300609362009E
-:1009A00094E180B3847231F49150D9F7109293009E
-:1009B00010928D00DF91CF911F9108951F93DC015C
-:1009C000162F8091810084FF07C08091820098E8F3
-:1009D00089278093820003C08AE580938100912F4C
-:1009E000E3E8F0E08D91819391501916DCF383E8F0
-:1009F00090E0612F8CDD1C5F109381001F910895A2
-:040A0000F894FFCF98
-:040A040001025AFF92
+:10016000B0E0E8E3FAE002C005900D92A436B107D2
+:10017000D9F710E0A4E6B0E001C01D92AD3AB10796
+:10018000E1F73CD157C43CCF1F920F920FB60F92AC
+:1001900011242F933F938F939F93839930C0809125
+:1001A0007300882339F481E0809373001092750006
+:1001B0001092640030917500383090F484990DC02D
+:1001C00080E890E0032E02C0959587950A94E2F7A7
+:1001D00020916400282B209364003F5F30937500CA
+:1001E00080917500883058F010927300109275005D
+:1001F000809164008093740081E0809376009F91E9
+:100200008F913F912F910F900FBE0F901F901895D7
+:10021000839BFECF80EA8A95F1F78C9A949884E5C7
+:1002200091E00197F1F7949A8C9810927600809162
+:1002300074000895809176008823E1F3E9DF089542
+:100240001092730010927400109275008B98839A2C
+:1002500085B7886085BF85B78B7F85BF8BB7806882
+:100260008BBF78948C9A949884E591E00197F1F78C
+:10027000949A8C980895282F30E0F901EA5DFF4F99
+:1002800044918056883010F090E004C02A5C3F4FC3
+:10029000F9019491442389F080916100883068F4D9
+:1002A000E82FF0E0E759FF4F40838F5F80936100B4
+:1002B000493319F481E08093670080916900982B9D
+:1002C000909369000895282F30E0F901EA5DFF4F0F
+:1002D00064918056883010F050E004C02A5C3F4F93
+:1002E000F9015491693381F4809161008830B0F54F
+:1002F000E82FF0E0E759FF4F60838F5F8093610044
+:1003000081E0809367002AC0662341F190916100EB
+:1003100042E020E030E015C0A42FB0E0FD01E75935
+:10032000FF4F8081861719F42F5F3F4F9150F901DD
+:10033000E759FF4FEA0FFB1F8081A759BF4F8C93EE
+:100340004F5F491748F39093610006C0E92FF0E032
+:10035000E759FF4F10829F5F9830C0F3509580910E
+:1003600069005823509369000895FC0189E690E0E4
+:10037000909392008093910080818076803271F515
+:100380008181813011F488E00895893049F48681B3
+:100390009781019719F581E0809365008FEF0895AB
+:1003A000823019F488E690E013C08A3029F4838102
+:1003B0008093680080E00895833031F4838188233E
+:1003C00069F41092600008958B3041F480E690E06B
+:1003D000909392008093910081E0089580E00895C9
+:1003E000FC0180916500882329F0613019F4808137
+:1003F000809366001092650081E00895DF92EF928D
+:10040000FF920F931F93CF93DF932FE088E190E04B
+:100410000FB6F894A89581BD0FBE21BD84E083BFBF
+:100420008E9A88E0E9E6F0E0DF011D928A95E9F70F
+:10043000ADD106DF7894C0E1D0E0EE2410E0FF24D7
+:10044000DD24D39402C0012F102FA895ACD1809148
+:1004500076000EC0DDDE982F969580FD06C0892FB0
+:100460000ADF969AEE24E39403C0892F2CDF11E073
+:1004700080917600882371F7012FEE2051F0809152
+:10048000820084FF06C089E690E068E0B1D29698C9
+:10049000EE2408B600FED7CFD8BE8091670088232F
+:1004A00029F1219719F5109267004091610022E02F
+:1004B00030E013C0F901E759FF4F8081893359F4C7
+:1004C00004C02F5F3F4F8181819327303105CCF3EA
+:1004D0001092700041502F5F3F4F842F90E02817FB
+:1004E000390744F340936100C0E1D0E08F2D8F5F66
+:1004F000853018F0BCEFFB0EA6CFF09068001123FA
+:1005000009F4A1CF8091820084FF9ECF89E690E01C
+:1005100068E06ED200E098CFA82FB92F80E090E07D
+:1005200041E050EA609530E009C02D91822797950F
+:10053000879510F084279527305EC8F36F5FA8F386
+:100540000895EADF8D939D930895CF93CFB7CF930E
+:10055000DF93C395859BE9F7859B0BC0859B09C0FD
+:10056000859B07C0859B05C0859B03C0859B01C0FB
+:100570008BC06F93C0919000DD27C956DF4F2F933A
+:1005800065E5859B03C02F916F91E6CF0F931F9375
+:100590004F9320E040E15F9300B3047205FB27F91D
+:1005A0003F9350E03BE039C0147240642F77012F35
+:1005B0005F5F1EC0406810B314722F7752501FC087
+:1005C000406400B32F770472D1F15F5F00C023C095
+:1005D000406210B32F77147291F15F5F00C025C0A5
+:1005E00004721027515012F45D5F000011502795DE
+:1005F0002C3F10B3C8F614720127015027952C3FE9
+:10060000C8F64227499300B3047210274F73115064
+:1006100027952C3FA8F64695469510B3147279F0AD
+:100620000127015027952C3F98F66B5A60F3315003
+:1006300000B3B0F600C010E41ABF002719C03B5049
+:100640003195C31BD04010E41ABF0881033C09F167
+:100650000B34F9F020918E001981110F1213EDCF98
+:100660004A81441F093651F10D3211F0013E29F73C
+:10067000009395003F915F914F911F910F912F91A2
+:100680006F91CAB7C6FD65CFDF91CF91CFBFCF9134
+:10069000189520919500222369F31091930011235E
+:1006A00091F5343092F13093930020938F001091A4
+:1006B00090003BE0311B3093900027C000919300E5
+:1006C00001300CF50AE54F7049F43091620034FDB9
+:1006D0001DC000936200C7E7D0E01CC030918200CB
+:1006E00034FD14C000938200C3E8D0E013C0052796
+:1006F00010E000C0000002BB1AC0052710E0221F56
+:100700001DC010E021C04AE502C032ED432FC4E114
+:10071000D0E032E011B31462959A02B311BB54E2F7
+:1007200020E865E320FF052702BB279517951C3FAE
+:10073000F0F66695B8F7B1F720FF052702BB2795BD
+:1007400017951C3FD0F62795179517FF0527000032
+:100750001C3F02BBB0F629913A9519F70B7D109119
+:100760009400110FC651D04002BB11F010938E00BF
+:1007700010E41ABF006211B31B7D402F4B7D54E083
+:100780005A95F1F702BB11BB42BB74CF85B78360AA
+:1007900085BF8BB780648BBF8BE4809383008AE531
+:1007A0008093820008951F93CF93DF93609193000D
+:1007B000635067FDC2C080919000CCE0D0E0C81BC0
+:1007C000D109C956DF4F80918F008D3209F0A3C047
+:1007D000683009F0B0C083EC809377008AE580939D
+:1007E0006200109271008881807639F0CE01BDDD03
+:1007F000282F8F3F09F47EC084C09A811092800018
+:100800008981882321F41092810022E06CC0853018
+:1008100019F49093940066C0863009F04FC08B8124
+:10082000813041F48BE191E09093920080939100AC
+:1008300022E140C0823041F48DE291E09093920039
+:100840008093910022E236C08330F9F48A818823B4
+:1008500041F48DED90E0909392008093910024E01C
+:1008600029C0813041F481EE90E090939200809312
+:10087000910024E21FC08230E1F485E091E0909382
+:1008800092008093910026E115C0813241F48FE3FC
+:1008900091E0909392008093910029E00BC0823206
+:1008A00041F48EE990E090939200809391002FE3C1
+:1008B00001C020E080E48093710023C0883021F4DF
+:1008C00021E086E990E011C0893019F490939600F8
+:1008D00009C08A3011F421E006C08B3019F48BE492
+:1008E0008093830020E080E890E0909392008093D2
+:1008F000910007C0888187FD2E8180E88093710078
+:1009000006C08F81882319F48E81821708F0822F08
+:100910008093630010C08091710087FF0CC0CE01EE
+:100920005FDD8F3F21F48EE18093620004C0882355
+:1009300011F010926300109293008091620084FF86
+:1009400049C0809163008F3F09F444C0182F89305B
+:1009500008F018E0811B809363008091770098E88D
+:10096000892780937700112341F1209191003091E4
+:1009700092008091710086FF0DC0A8E7B0E080E092
+:1009800090E0F901E80FF91FE491ED930196181733
+:10099000C1F708C0912FD901E8E7F0E08D9181936C
+:1009A0009150E1F71150812F90E01F5F0196820F67
+:1009B000931F909392008093910088E790E0612FBD
+:1009C000C0DD612F6C5F6C3019F08FEF8093630096
+:1009D0006093620094E180B3847231F49150D9F74E
+:1009E0001092940010928E00DF91CF911F91089584
+:1009F0001F93DC01162F8091820084FF07C0809135
+:100A0000830098E889278093830003C08AE5809358
+:100A10008200912FE4E8F0E08D91819391501916B6
+:100A2000DCF384E890E0612F8CDD1C5F1093820082
+:080A30001F910895F894FFCF17
+:040A380001025AFF5E
 :00000001FF
Index: aktousb/code/keycodes.h
===================================================================
--- aktousb/code/keycodes.h	(revision d082564c6e937687f72c28d1e742f99c032c90e5)
+++ aktousb/code/keycodes.h	(revision cbc34d1ee7fc344d958f8159688a78597b55072d)
@@ -134,6 +134,6 @@
 
 	KEY_Help = 0x75,
-	KEY_KPLParen = 0x182,
-   KEY_KPRParen = 0x183,	
+	KEY_KPLParen, // should be 0x182, but windows XP doesn't accept keycodes above 7F...
+   KEY_KPRParen,	
 };
 
Index: aktousb/code/main.c
===================================================================
--- aktousb/code/main.c	(revision d082564c6e937687f72c28d1e742f99c032c90e5)
+++ aktousb/code/main.c	(revision cbc34d1ee7fc344d958f8159688a78597b55072d)
@@ -78,11 +78,16 @@
 		}
 	} else if (key != KEY_Reserved) {
+		int j = 0;
 		for (i = 2; i < reportIndex; i++) {
 			if (reportBuffer[i] == key) {
-				for (; i < 7; i++)
-					reportBuffer[i] = reportBuffer[i+1];
-				reportBuffer[7] = 0;
+				j++;
 				reportIndex--;
 			}
+			reportBuffer[i] = reportBuffer[i+j];
+		}
+
+		for (i = reportIndex; i < 8; i++)
+		{
+			reportBuffer[i] = 0;
 		}
 	}
@@ -131,5 +136,5 @@
 		updateNeeded = char_waiting;
 
-		if (char_waiting) {
+		while (char_waiting) {
 			key_code = ak_read_scancode();
 			// if an update is needed, send the report
