summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-07-02 14:27:14 +0900
committertmk <nobody@nowhere>2011-07-02 14:27:14 +0900
commitf382fc93d5cbee8209069d5da590177b8dbd4a02 (patch)
tree19aaea7e3b7a64e054e4a78d0a64ff8c3c3f5589
parent1bda8a8c69e7b1e5e62233d9f5a63d0dca0ef4fb (diff)
Change layer pram and keymap of HHKB. Fix vusb/host.c.
-rw-r--r--hhkb/keymap.c8
-rwxr-xr-x[-rw-r--r--]layer.c2
-rw-r--r--vusb/host.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/hhkb/keymap.c b/hhkb/keymap.c
index fb42a0a169..681658db0c 100644
--- a/hhkb/keymap.c
+++ b/hhkb/keymap.c
@@ -151,11 +151,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Gui |Alt |xxxxxxxxxxxxxxxxxxxxxxx|Alt |Gui|
* `--------------------------------------------'
*/
+/*
KEYMAP(KB_MINS,KB_0, KB_9, KB_8, KB_7, KB_6, KB_5, KB_4, KB_3, KB_2, KB_1, KB_NO, KB_NO, KB_NO, KB_ESC, \
KB_BSPC,KB_P, KB_O, KB_I, KB_U, KB_Y, KB_T, KB_R, KB_E, KB_W, KB_Q, KB_NO, KB_NO, KB_TAB, \
KB_LCTL,KB_SCLN,KB_L, KB_K, KB_J, KB_H, KB_G, KB_F, KB_D, KB_S, KB_A, KB_RCTL,KB_RCTL, \
KB_LSFT,KB_SLSH,KB_DOT, KB_COMM,KB_M, KB_N, KB_B, KB_V, KB_C, KB_X, KB_Z, KB_RSFT,KB_NO, \
KB_LGUI,KB_LALT,KB_FN4, KB_RALT,KB_RGUI)
+*/
+ /* Mouse mode (Space) */
+ KEYMAP(KB_ESC, KB_F1, KB_F2, KB_F3, KB_F4, KB_F5, KB_F6, KB_F7, KB_F8, KB_F9, KB_F10, KB_F11, KB_F12, KB_INS, KB_DEL, \
+ KB_TAB, KB_WH_L,KB_WH_U,KB_MS_U,KB_WH_D,KB_WH_R,KB_WH_L,KB_WH_D,KB_WH_U,KB_WH_R,KB_NO, KB_NO, KB_NO, KB_BSPC, \
+ KB_LCTL,KB_NO, KB_MS_L,KB_MS_D,KB_MS_R,KB_NO, KB_MS_L,KB_MS_D,KB_MS_U,KB_MS_R,KB_FN3, KB_NO, KB_ENT, \
+ KB_LSFT,KB_BTN4,KB_BTN5,KB_BTN1,KB_BTN2,KB_BTN3,KB_BTN2,KB_BTN1,KB_BTN4,KB_BTN5,KB_NO, KB_RSFT,KB_NO, \
+ KB_LGUI,KB_LALT,KB_FN4, KB_RALT,KB_RGUI),
};
diff --git a/layer.c b/layer.c
index 700752c98a..12fd857cfc 100644..100755
--- a/layer.c
+++ b/layer.c
@@ -52,7 +52,7 @@
*/
// LAYER_ENTER_DELAY: prevent from moving new layer
-#define LAYER_ENTER_DELAY 5
+#define LAYER_ENTER_DELAY 10
// LAYER_SEND_FN_TERM: send keycode if release key in this term
#define LAYER_SEND_FN_TERM 40
diff --git a/vusb/host.c b/vusb/host.c
index 0a507d4820..590d2363b8 100644
--- a/vusb/host.c
+++ b/vusb/host.c
@@ -115,7 +115,7 @@ static uint8_t kbuf_tail = 0;
void host_vusb_keyboard_send(void)
{
- while (usbInterruptIsReady() && kbuf_head != kbuf_tail) {
+ if (usbInterruptIsReady() && kbuf_head != kbuf_tail) {
usbSetInterrupt((void *)&kbuf[kbuf_tail], sizeof(report_keyboard_t));
kbuf_tail = (kbuf_tail + 1) % KBUF_SIZE;
}