1
0

adb_usb: Fix keypad and media keys of unimap

This commit is contained in:
tmk 2016-08-29 22:25:12 +09:00
parent 4ace8711ca
commit 8027dc51f4
5 changed files with 1179 additions and 1178 deletions

View File

@ -1,10 +1,10 @@
ADB to USB keyboard converter
=============================
This firmware converts Apple ADB keyboard protocol to USB. You can use TMK Converter, PJRC Teensy2.0 and other USB AVR MCU(ATMega32U4, AT90USB64/128 or etc) for this. But binary size is probably more than 10KB and it won't fit into 8K flash.
This firmware converts Apple ADB keyboard protocol to USB, you can use it to plug old ADB keyboard into modern computer. It works on TMK ADB-USB Converter, PJRC Teensy2.0 and other USB AVR MCU(ATMega32U4, AT90USB64/128 or etc) and needs more than 10KB flash at least.
Discuss: http://geekhack.org/showwiki.php?title=Island:14290
Discuss here: http://geekhack.org/showwiki.php?title=Island:14290
TMK Converter: https://geekhack.org/index.php?topic=72052.0
You can buy a TMK converter here: https://geekhack.org/index.php?topic=72052.0

View File

@ -16,8 +16,8 @@
:1000F0001C171E1F202123222E26242D25273012D7
:10010000182F0C13280F0D340E33313638111037D9
:100110002B2C352A5829787B79397A504F515272D5
:100120006C63805580578053808080545880566D12
:100130006E6762595A5B5C5D5E5F6F606174756685
:100120006C63685680668053020103555880576D92
:100130006E5462595A5B5C5D5E5F6F606174756698
:100140003E3F403C4142774476466B47804365459D
:100150008048494A4B4C3D4D3B4E3A7D7E7C7F73F7
:100160000A0025303862003A2000253032580072EB
@ -151,9 +151,9 @@
:10096000592045585452414B455920434F4E534FFF
:100970004C4520434F4D4D414E44204B45594D4130
:10098000505F53454354494F4E20343039360A00A6
:100990004255494C443A20393335633432362D645C
:1009A00069727479202831343A33343A333920412A
:1009B00075672032392032303136290A00564944D1
:100990004255494C443A20633634616436322D6402
:1009A00069727479202831313A31353A3130204139
:1009B00075672033302032303136290A00564944D9
:1009C0003A2030784645454428742E6D2E6B2E29EA
:1009D000205049443A203078304144422841444232
:1009E000206B6579626F61726420636F6E766572E9
@ -1252,7 +1252,7 @@
:104E240008140A321E404D36223F04F203BC039A92
:104E34000326033F03580371030102030405060715
:044E44000809000059
:106800008800EA44E944E244040005000600070069
:106800000000EA44E944E2440400050006000700F1
:10681000080009000A000B000C000D000E000F001C
:1068200010001100120013001400150016001700CC
:10683000180019001A001B001C001D001E001F007C
@ -1262,26 +1262,26 @@
:10687000380082003A003B003C003D003E003F00F3
:1068800040004100420043004400450046004700EC
:10689000480049004A004B004C004D004E004F009C
:1068A000500051005200530054005500560057004C
:1068A000500051005200530067005400550056003C
:1068B000580059005A005B005C005D005E005F00FC
:1068C000600061006200630064006500850067008D
:1068D000680069006A006B006C006D006E006F005C
:1068E0007000710072007300890087008A008B00BD
:1068C0006000610062006300640000005700000087
:1068D0006800000000000000000000000000000050
:1068E0000000000000007300000000000000000035
:1068F000E000E100E200E300E400E500E600E7007C
:106900008800EA44E944E244EA4405000600E2441F
:10691000080009000A000B0046000D004A004B0069
:10692000100011004700480014001500E94417004A
:10693000180019001A001B001C001D003A003B0043
:106900000100010001000100EA4401000100E2442D
:106910000100010001000100460001004A004B0097
:10692000010001004700480001000100E9440100A6
:106930000100010001000100010001003A003B00DC
:106940003C003D003E003F0040004100420043004B
:10695000280029004C002B002C0044004500520068
:1069600049000100320050004F0001004D004E0070
:10697000510082003A003B003C003D003E003F00D9
:1069800040004100420043004400450046004700EB
:10699000480049004A004B004C004D004E004D009D
:1069A0004A004E004B005300F550F650FA50F95093
:1069B000F650FB50F150FC50F250F150F350FA50A9
:1069C000F050F950F450F55064006500F750F45061
:1069D000680069006A006B006C006D006E006F005B
:1069E0007000710072007300890087008A008B00BC
:1069F000E000E100E200E300E400E500E600E7007B
:10695000010001004C00010001004400450052000C
:1069600049000100010050004F0001004D004E00A1
:1069700051000100010001000100010001000100BF
:1069800001000100010001000100010001000100FF
:1069900001000100010001000100010001004D00A3
:1069A0004A004E004B0001000100010001000100FF
:1069B00001000100010001000100010001000100CF
:1069C00001000100010001000100010001000100BF
:1069D00001000100010001000100010001000100AF
:1069E000010001000100010001000100010001009F
:1069F000010001000100010001000100010001008F
:00000001FF

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* Command = Gui
* Option = Alt
* Power key = F24
* Mic = F13(Adjustable keyboard)
*/
// http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c
// http://opensource.apple.com//source/IOHIDFamily/IOHIDFamily-701.20.10/IOHIDFamily/Cosmo_USB2ADB.c
@ -130,26 +131,26 @@ const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
{
UNIMAP_F17, // 0x40
UNIMAP_KP_DOT, // 0x41
UNIMAP_NO, // 0x42
UNIMAP_KP_ASTERISK, // 0x43
UNIMAP_F13, // 0x42 Mic(Adjustable keyboard)
UNIMAP_KP_MINUS, // 0x43 ADB keypad asterisk(top right)
UNIMAP_NO, // 0x44
UNIMAP_KP_PLUS, // 0x45
UNIMAP_KP_COMMA, // 0x45 ADB keypad plus
UNIMAP_NO, // 0x46
UNIMAP_NUMLOCK, // 0x47
},
{
UNIMAP_NO, // 0x48
UNIMAP_NO, // 0x49
UNIMAP_NO, // 0x4A
UNIMAP_KP_SLASH, // 0x4B
UNIMAP_VOLUME_UP, // 0x48 Vol Up(Adjustable keyboard)
UNIMAP_VOLUME_DOWN, // 0x49 Vol Down(Adjustable keyboard)
UNIMAP_VOLUME_MUTE, // 0x4A Vol Mute(Adjustable keyboard)
UNIMAP_KP_ASTERISK, // 0x4B ADB keypad slash(between equal and asterisk)
UNIMAP_KP_ENTER, // 0x4C
UNIMAP_NO, // 0x4D
UNIMAP_KP_MINUS, // 0x4E
UNIMAP_KP_PLUS, // 0x4E ADB keypad minus
UNIMAP_F18, // 0x4F
},
{
UNIMAP_F19, // 0x50
UNIMAP_KP_EQUAL, // 0x51
UNIMAP_KP_SLASH, // 0x51 ADB keypad equal(next to clear/numlock)
UNIMAP_KP_0, // 0x52
UNIMAP_KP_1, // 0x53
UNIMAP_KP_2, // 0x54

View File

@ -26,21 +26,21 @@ const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] __attribute__ ((section ("
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = {
#endif
UNIMAP(
F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
F13, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, F24,
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,
FN0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, FN1, DEL, END, PGDN, P7, P8, P9, PPLS,
LCAP,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM,
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL,
LCTL,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
FN0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NO, BSPC, INS, HOME,PGUP, NLCK,PEQL,PSLS,PAST,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, FN1, DEL, END, PGDN, P7, P8, P9, PMNS,
LCAP,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PPLS,
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, NO, RSFT, UP, P1, P2, P3, NO,
LCTL,LGUI,LALT,NO, SPC, NO, NO, RALT,RGUI,NO, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
),
UNIMAP(
F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,
TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, JYEN,DEL, INS, HOME,PGUP, NLCK,BTN2,BTN3,WH_D,
TAB, Q, W, E, R, T, Y, U, PSCR,SLCK,PAUS,UP, INS, TRNS, DEL, END, PGDN, WH_D,MS_U,WH_U,WH_U,
LCAP,VOLD,VOLU,MUTE,F, G, H, J, HOME,PGUP,LEFT,RGHT, NUHS,ENT, MS_L,MS_D,MS_R,BTN4,
LSFT,NUBS,Z, X, C, V, B, N, M, END, PGDN,DOWN, RO, RSFT, PGUP, WH_L,MS_D,WH_R,BTN1,
LCTL,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,RGUI,APP, RCTL, HOME,PGDN,END, BTN1, BTN2,BTN3
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,
TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,UP, INS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,TRNS,TRNS,HOME,PGUP,LEFT,RGHT, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,END, PGDN,DOWN, TRNS,TRNS, PGUP, TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, HOME,PGDN,END, TRNS, TRNS,TRNS
),
};