Closed Oryhara closed 11 years ago
You need this line in Makefile. CONSOLE_ENABLE = yes
did that. recompiled and reuploaded. still nothing in HID_listen.
what is your os? Try other OS. If you use windows try another USB port or remove and install driver from device manager. If you use linux do you have enough permission?
nevermind. second ID10T error. forgot to turn off hid_listen when reuploading the new hex file.
Thanks for the help. Now i can at least try and debug why layer switching isnt working. I disabled the "Use legacy keymap" stuff that was initially in the ADB converter, and I added the functions to keymap.c from the hhkb example(it wouldnt compile until I did that) but I can't get the space bar to momentarily switch keymaps while being held, and register a space keystroke when tapped.
ok.
I think that function can works on either legacy or new keymap. If you need help post all lines of your keymap.c.
post all the lines right here in the comment field?
/* Copyright 2011 Jun Wako wakojun@gmail.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */
/*
K35, K7A,K78,K63,K76, K60,K61,K62,K64, K65,K6D,K67,K6F, K69,K6B,K71, K7F, \
K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74, K47,K51,K4B,K43, \
K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79, K59,K5B,K5C,K4E, \
K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K45, \
K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K3E, K53,K54,K55, \
K36,K3A,K37, K31, K7C,K7D, K3B,K3D,K3C, K52, K41,K4C, \
/\* for ISO/JIS keyboard _/ \
K0A, /_ NON-US \ and | 0x64 _/ \
K34, /_ Keypad ENTER 0x58 _/ \
K40, /_ F17 0x6C _/ \
K44, /_ F18? 0x6d _/ \
K4F, /_ F18 0x6d _/ \
K50, /_ F19 0x6e _/ \
K5A, /_ F20 0x6f _/ \
K5D, /_ INTL3(Yen) 0x89 _/ \
K5E, /_ INTL1(Ro) 0x87 _/ \
K5F, /_ Keypad Comma 0x85 _/ \
K66, /_ LANG2(Eisu) 0x91 _/ \
K68, /_ LANG1(Kana) 0x90 _/ \
K6A, /_ F16 0x6B _/ \
K6E /_ Application 0x65 */ \
) { \ { KC##K00, KC##K01, KC##K02, KC##K03, KC##K04, KC##K05, KC##K06, KC##K07 }, \ { KC##K08, KC##K09, KC##K0A, KC##K0B, KC##K0C, KC##K0D, KC##K0E, KC##K0F }, \ { KC##K10, KC##K11, KC##K12, KC##K13, KC##K14, KC##K15, KC##K16, KC##K17 }, \ { KC##K18, KC##K19, KC##K1A, KC##K1B, KC##K1C, KC##K1D, KC##K1E, KC##K1F }, \ { KC##K20, KC##K21, KC##K22, KC##K23, KC##K24, KC##K25, KC##K26, KC##K27 }, \ { KC##K28, KC##K29, KC##K2A, KC##K2B, KC##K2C, KC##K2D, KC##K2E, KC##K2F }, \ { KC##K30, KC##K31, KC##K32, KC##K33, KC##K34, KC##K35, KC##K36, KC##K37 }, \ { KC##K38, KC##K39, KC##K3A, KC##K3B, KC##K3C, KC##K3D, KC_##K3E, KCNO }, \ { KC##K40, KC_##K41, KCNO, KC##K43, KC##K44, KC##K45, KCNO, KC##K47 }, \ { KC_NO, KC_NO, KCNO, KC##K4B, KC_##K4C, KCNO, KC##K4E, KC##K4F }, \ { KC##K50, KC##K51, KC##K52, KC##K53, KC##K54, KC##K55, KC##K56, KC##K57 }, \ { KC##K58, KC##K59, KC##K5A, KC##K5B, KC##K5C, KC##K5D, KC##K5E, KC##K5F }, \ { KC##K60, KC##K61, KC##K62, KC##K63, KC##K64, KC##K65, KC##K66, KC##K67 }, \ { KC##K68, KC##K69, KC##K6A, KC_##K6B, KCNO, KC##K6D, KC##K6E, KC##K6F }, \ { KCNO, KC##K71, KC##K72, KC##K73, KC##K74, KC##K75, KC##K76, KC##K77 }, \ { KC##K78, KC##K79, KC##K7A, KC##K7B, KC##K7C, KC##K7D, KCNO, KC##K7F } \ }
/* Apple Extended Keyboard US
---'
---------------' ---------------'
---------------' -----------'
---'-----------------------------------------------------------'
-----------' `---------------'
_/
K35, K7A,K78,K63,K76, K60,K61,K62,K64, K65,K6D,K67,K6F, K69,K6B,K71, K7F, \ K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74, K47,K51,K4B,K43, \ K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79, K59,K5B,K5C,K4E, \ K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K45, \ K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K3E, K53,K54,K55, \ K36,K3A,K37, K31, K7C,K7D, K3B,K3D,K3C, K52, K41,K4C \ ) KEYMAPALL( \ K35, K7A,K78,K63,K76, K60,K61,K62,K64, K65,K6D,K67,K6F, K69,K6B,K71, K7F, \ K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74, K47,K51,K4B,K43, \ K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79, K59,K5B,K5C,K4E, \ K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K45, \ K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K3E, K53,K54,K55, \ K36,K3A,K37, K31, K7C,K7D, K3B,K3D,K3C, K52, K41,K4C, \ / for ISO/JIS keyboard _/ \ NONUSBSLASH, / NON-US \ and | 0x64 _/ \ KPENTER, / Keypad ENTER 0x58 / \ F17, / F17 0x6C / \ F18, / F18? 0x6d / \ F18, / F18 0x6d / \ F19, / F19 0x6e / \ F20, / F20 0x6f / \ INT3, / INTL3(Yen) 0x89 / \ INT1, / INTL1(Ro) 0x87 _/ \ KPCOMMA, / Keypad Comma 0x85 / \ LANG2, / LANG2(Eisu) 0x91 / \ LANG1, / LANG1(Kana) 0x90 / \ F16, / F16 0x6B / \ APPLICATION / Application 0x65 */ \ )
/* M0116
K7F, \
K35,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K51,K4B,K43, \ K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K45, \ K36,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K4E, \ K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K53,K54,K55, \ K39,K3A,K37,K32, K31, K2A,K3B,K3C,K3D,K3E, K52, K41,K4C \ ) { \ { KC##K00, KC##K01, KC##K02, KC##K03, KC##K04, KC##K05, KC##K06, KC##K07 }, \ { KC##K08, KC##K09, KCNO, KC##K0B, KC##K0C, KC##K0D, KC##K0E, KC##K0F }, \ { KC##K10, KC##K11, KC##K12, KC##K13, KC##K14, KC##K15, KC##K16, KC##K17 }, \ { KC##K18, KC##K19, KC##K1A, KC##K1B, KC##K1C, KC##K1D, KC##K1E, KC##K1F }, \ { KC##K20, KC##K21, KC##K22, KC##K23, KC##K24, KC##K25, KC##K26, KC##K27 }, \ { KC##K28, KC##K29, KC##K2A, KC##K2B, KC##K2C, KC##K2D, KC##K2E, KC##K2F }, \ { KC##K30, KC##K31, KC##K32, KC##K33, KCNO, KC##K35, KC##K36, KC##K37 }, \ { KC##K38, KC##K39, KC##K3A, KC##K3B, KC##K3C, KC##K3D, KC_##K3E, KC_NO }, \ { KCNO, KC##K41, KCNO, KC##K43, KCNO, KC##K45, KCNO, KC##K47 }, \ { KC_NO, KC_NO, KCNO, KC##K4B, KC_##K4C, KCNO, KC##K4E, KC_NO }, \ { KCNO, KC##K51, KC##K52, KC##K53, KC##K54, KC##K55, KC##K56, KC##K57 }, \ { KC##K58, KC##K59, KCNO, KC##K5B, KC_##K5C, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO , KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO , KC_NO, KCNO , KC##K7B, KC_NO, KC_NO, KCNO, KC##K7F } \ }
// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed. static const uint8_t PROGMEM fn_layer[] = { 0, // Fn0 0, // Fn1 0, // Fn2 0, // Fn3 0, // Fn4 0, // Fn5 0, // Fn6 0 // Fn7 };
/*
};
// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. // See layer.c for details. static const uint8_t PROGMEM fn_keycode[] = { KC_NO, // Fn0 KC_NO, // Fn1 KC_NO, // Fn2 KC_NO, // Fn3 KC_NO, // Fn4 KC_NO, // Fn5 KC_NO, // Fn6 KC_NO // Fn7 };
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Apple Extended Keyboard US
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|
* ---'
---------------' ---------------'
---------------' -----------'
---'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| =| /| *|
-----------' |---------------| \* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| +| \* |-----------------------------------------------------------| ,---. |---------------| \* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | \* |-----------------------------------------------------------| ,-----------. |-----------|Ent| \* |Ctrl |Opt |Cmd | Space | |Opt |Ctrl | |Lef|Dow|Rig| | 0| .| | \*
-----------------------------------------------------------'-----------'
---------------'
*/
KEYMAP_EXTENDED_US(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, PWR,
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PEQL,PSLS,PAST,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PMNS,
LCAP,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3,
LCTL,LGUI,LALT, SPC, RGUI,RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
),/* Layer 1: Matias half-qwerty keyboard style (Space)
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|
* `---' `---------------' `---------------' `---------------' `-----------' `---'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | -| 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | |Esc| |Ins|Hom|PgU| |NmL| =| /| *|
* |-----------------------------------------------------------| |-----------| |---------------|
* |Backs| P| O| I| U| Y| T| R| E| W| Q| | |Tab | |Del|End|PgD| | 7| 8| 9| -|
* |-----------------------------------------------------------| `-----------' |---------------|
* |Contro| ;| L| K| J| H| G| F| D| S| A| '|Control | | 4| 5| 6| +|
* |-----------------------------------------------------------| ,---. |---------------|
* |Shift | /| .| ,| M| N| B| V| C| X| Z|Shift | | |Up | | 1| 2| 3| |
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
* |Ctrl |Opt |Cmd | Space | |Opt |Ctrl | |Lef|Dow|Rig| | 0| .| |
* `-----------------------------------------------------------' `-----------' `---------------'
*/
KEYMAP_EXTENDED_US(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, PWR,
BSPC,0, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO, NO, GRV, INS, HOME,PGUP, NLCK,PEQL,PSLS,PAST,\
BSLS,P, O, I, U, Y, T, R, E, W, Q, NO, NO, TAB, DEL, END, PGDN, P7, P8, P9, PMNS,\
ENT ,SCLN,L, K, J, H, G, F, D, S, A, QUOT,ENT, P4, P5, P6, PPLS,\
LSFT,SLSH,DOT, COMM,M, N, B, V, C, X, Z, RSFT, UP, P1, P2, P3, \
LCTL,LGUI,LALT, TRNS, RGUI,RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT),
/* layer 2Apple Extended Keyboard US Dvorak
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|
* `---' `---------------' `---------------' `---------------' `-----------' `---'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa| |Ins|Hom|PgU| |NmL| =| /| *|
* |-----------------------------------------------------------| |-----------| |---------------|
* |Tab | '| ,| .| P| Y| F| G| C| R| L| ?| =| \| |Del|End|PgD| | 7| 8| 9| -|
* |-----------------------------------------------------------| `-----------' |---------------|
* |CapsLo| A| O| E| U| I| D| H| T| N| S| -|Return | | 4| 5| 6| +|
* |-----------------------------------------------------------| ,---. |---------------|
* |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift | |Up | | 1| 2| 3| |
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
* |Ctrl |Opt |Cmd | Space | |Opt |Ctrl | |Lef|Dow|Rig| | 0| .| |
* `-----------------------------------------------------------' `-----------' `---------------'
*/
KEYMAP_EXTENDED_US(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, PWR,
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,BSPC, INS, HOME,PGUP, NLCK,PEQL,PSLS,PAST,
TAB,QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH, EQL,BSLS, DEL, END, PGDN, P7, P8, P9, PMNS,
LCAP,A, O, E, U, I, D, H, T, N, S, MINS, ENT, P4, P5, P6, PPLS,
LSFT,SCLN,Q, J, K, X, B, M, W, V, Z, RSFT, UP, P1, P2, P3,
LCTL,LGUI,LALT, SPC, RGUI,RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT
),
/* layer 3 Apple Extended Keyboard US MATIAS SHIFTED Dvorak
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|
* `---' `---------------' `---------------' `---------------' `-----------' `---'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa| |Ins|Hom|PgU| |NmL| =| /| *|
* |-----------------------------------------------------------| |-----------| |---------------|
* |Tab | L| R| C| G| F| Y| P| .| ,| '| ?| =| \| |Del|End|PgD| | 7| 8| 9| -|
* |-----------------------------------------------------------| `-----------' |---------------|
* |CapsLo| S| N| T| H| D| I| U| E| O| A| -|Return | | 4| 5| 6| +|
* |-----------------------------------------------------------| ,---. |---------------|
* |Shift | Z| V| W| M| B| X| K| J| Q| ;|Shift | |Up | | 1| 2| 3| |
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
* |Ctrl |Opt |Cmd | Space | |Opt |Ctrl | |Lef|Dow|Rig| | 0| .| |
* `-----------------------------------------------------------' `-----------' `---------------'
*/
KEYMAP_EXTENDED_US(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, PWR,
BSPC,0, 9, 8, 7, 6, 5, 4, 3, 2, 1, TRNS,TRNS, GRV, INS, HOME,PGUP, NLCK,PEQL,PSLS,PAST,\
BSLS,L, R, C, G, F, Y, P, DOT,COMM,QUOT, TRNS,TRNS, TAB, DEL, END, PGDN, P7, P8, P9, PMNS,\
ENT ,S, N, T, H, D, I, U, E, O, A, TRNS, ENT, P4, P5, P6, PPLS,\
LSFT,Z, V, W, M, B, X, K, J, Q,SCLN, RSFT, UP, P1, P2, P3, \
LCTL,LGUI,LALT, TRNS, RGUI,RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT),
};
uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col) { return KEYCODE(layer, row, col); }
uint8_t keymap_fn_layer(uint8_t index) { return pgm_read_byte(&fn_layer[index]); }
uint8_t keymap_fn_keycode(uint8_t index) { return pgm_read_byte(&fn_keycode[index]); } /* translates key to keycode */ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) { return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); }
/* translates Fn index to action */ action_t keymap_fn_to_action(uint8_t keycode) { action_t action; if (FN_INDEX(keycode) < sizeof(fn_actions) / sizeof(fn_actions[0])) { action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); } else { action.code = ACTION_NO; } return action; }
sorry, post it again using gist.github.com.
https://gist.github.com/Oryhara/6045645 Ideally speaking, i'd like to be able to hold spacebar and get keys for the other hand, in both qwerty and dvorak, but it would be more important in dvorak, if i could only have it for one layout. Reading the documentation it didnt seem that the layer switching commands could do increment or decrement to layer, but maybe it can.
I think i have it set up to do the half-qwerty thing for just qwerty layout, but if that works then i can switch it to the dvorak side.
what was i doing wrong?
Also: that works, thank you.
First of all, you had no FN1 on layer 0. take a diff for the detail.
Thanks again. My issue is solved. we can close this, i guess? I am not aware of how the system works.
OK. closed. got to sleep.
I hate to write an ID10T bug, given that I work in QA, but I can't get any output from my Teensy 2.0 in the HID listen application on my mac.
I've compiled and loaded the adb_usb code and the keyboard works properly as an ADB keyboard. I want to add some keymap layer stuff to it(the matias half-qwerty from the hhkb example keymap) and that doesn't work. I tried to get HID listen to give me some debug information, but i cant even get that to show me anything.
I just see "Waiting for Device..."
Is there something in config.h that needs to be set for it to send debug information to HID Listen?