From 5a8dbc63ea29eb454ad5f36de5c6c33172230f88 Mon Sep 17 00:00:00 2001 From: Colt Ma Date: Fri, 26 Dec 2014 11:02:25 +0800 Subject: Add keycode for Fast Forward & Rewind KC_MEDIA_FAST_FORWARD KC_MEDIA_REWIND --- common/keycode.h | 6 +++++- common/report.h | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/keycode.h b/common/keycode.h index 08c3cbf42b..074e0f68f9 100644 --- a/common/keycode.h +++ b/common/keycode.h @@ -140,6 +140,8 @@ along with this program. If not, see . #define KC_VOLD KC_AUDIO_VOL_DOWN #define KC_MNXT KC_MEDIA_NEXT_TRACK #define KC_MPRV KC_MEDIA_PREV_TRACK +#define KC_MFFD KC_MEDIA_FAST_FORWARD +#define KC_MRWD KC_MEDIA_REWIND #define KC_MSTP KC_MEDIA_STOP #define KC_MPLY KC_MEDIA_PLAY_PAUSE #define KC_MSEL KC_MEDIA_SELECT @@ -420,7 +422,9 @@ enum internal_special_keycodes { KC_WWW_FORWARD, KC_WWW_STOP, KC_WWW_REFRESH, - KC_WWW_FAVORITES, /* 0xBA */ + KC_WWW_FAVORITES, + KC_MEDIA_FAST_FORWARD, + KC_MEDIA_REWIND, /* 0xBC */ /* Fn key */ KC_FN0 = 0xC0, diff --git a/common/report.h b/common/report.h index 62190469a4..f6c0a315de 100644 --- a/common/report.h +++ b/common/report.h @@ -61,6 +61,7 @@ along with this program. If not, see . /* supplement for Bluegiga iWRAP HID(not supported by Windows?) */ #define AL_LOCK 0x019E #define TRANSPORT_RECORD 0x00B2 +#define TRANSPORT_FAST_FORWARD 0x00B3 #define TRANSPORT_REWIND 0x00B4 #define TRANSPORT_EJECT 0x00B8 #define AC_MINIMIZE 0x0206 @@ -158,6 +159,8 @@ typedef struct { (key == KC_AUDIO_VOL_DOWN ? AUDIO_VOL_DOWN : \ (key == KC_MEDIA_NEXT_TRACK ? TRANSPORT_NEXT_TRACK : \ (key == KC_MEDIA_PREV_TRACK ? TRANSPORT_PREV_TRACK : \ + (key == KC_MEDIA_FAST_FORWARD ? TRANSPORT_FAST_FORWARD : \ + (key == KC_MEDIA_REWIND ? TRANSPORT_REWIND : \ (key == KC_MEDIA_STOP ? TRANSPORT_STOP : \ (key == KC_MEDIA_EJECT ? TRANSPORT_STOP_EJECT : \ (key == KC_MEDIA_PLAY_PAUSE ? TRANSPORT_PLAY_PAUSE : \ @@ -171,7 +174,7 @@ typedef struct { (key == KC_WWW_FORWARD ? AC_FORWARD : \ (key == KC_WWW_STOP ? AC_STOP : \ (key == KC_WWW_REFRESH ? AC_REFRESH : \ - (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))) + (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))))) #ifdef __cplusplus } -- cgit v1.2.3 From af556d39d2f5a1ee30c34ee65ecd5d1b7a519bdc Mon Sep 17 00:00:00 2001 From: Jun Wako Date: Fri, 26 Dec 2014 13:27:06 +0900 Subject: Remove unwanted white space --- common/keycode.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/keycode.h b/common/keycode.h index 074e0f68f9..ac4ef00db6 100644 --- a/common/keycode.h +++ b/common/keycode.h @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* +/* * Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf */ @@ -392,7 +392,7 @@ enum hid_keyboard_keypad_usage { KC_RALT, KC_RGUI, - /* NOTE: 0xE8-FF are used for internal special purpose */ + /* NOTE: 0xE8-FF are used for internal special purpose */ }; /* Special keycodes */ @@ -422,7 +422,7 @@ enum internal_special_keycodes { KC_WWW_FORWARD, KC_WWW_STOP, KC_WWW_REFRESH, - KC_WWW_FAVORITES, + KC_WWW_FAVORITES, KC_MEDIA_FAST_FORWARD, KC_MEDIA_REWIND, /* 0xBC */ -- cgit v1.2.3 From 22d99f26af757c0bedb31ba3f63d793e4b2d4ca3 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 1 Jan 2015 12:17:11 +0900 Subject: Fix modifier stuck of Lock command(#127) --- common/command.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common') diff --git a/common/command.c b/common/command.c index 971ef7f0af..1a507e3a46 100644 --- a/common/command.c +++ b/common/command.c @@ -194,6 +194,7 @@ static bool command_common(uint8_t code) case KC_CAPSLOCK: if (host_get_driver()) { host_driver = host_get_driver(); + clear_keyboard(); host_set_driver(0); print("Locked.\n"); } else { -- cgit v1.2.3 From 8f1e311cd7624d765901c69e61837db33a51928b Mon Sep 17 00:00:00 2001 From: Jun Wako Date: Fri, 12 Dec 2014 14:05:05 +0900 Subject: Ad hoc fix of print and debug for mbed --- common/print.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/print.c b/common/print.c index c13a29f317..ca94e1e5d6 100644 --- a/common/print.c +++ b/common/print.c @@ -22,13 +22,14 @@ * THE SOFTWARE. */ -#include -#include +#include #include "print.h" #ifndef NO_PRINT +#if defined(__AVR__) + #define sendchar(c) xputc(c) @@ -37,4 +38,11 @@ void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) xdev_out(sendchar_func); } +#elif defined(__arm__) + +// TODO +//void print_set_sendchar(int8_t (*sendchar_func)(uint8_t)) { } + +#endif + #endif -- cgit v1.2.3 From d0fefb76f8a1430c749e67bc72b4dba00c7143c9 Mon Sep 17 00:00:00 2001 From: Jun Wako Date: Sun, 4 Jan 2015 17:03:47 +0900 Subject: infinity: Add initial files for keyboard support --- common/matrix.h | 9 ++++++++- common/mbed/xprintf.cpp | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/matrix.h b/common/matrix.h index 23fef78f74..107ee72653 100644 --- a/common/matrix.h +++ b/common/matrix.h @@ -35,6 +35,10 @@ typedef uint32_t matrix_row_t; #define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<