summaryrefslogtreecommitdiff
path: root/converter/adb_usb/config.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-09-20 13:02:42 +0900
committertmk <nobody@nowhere>2012-09-21 10:51:44 +0900
commit9f05dc6f444e159af3805baf5117be4d0da2d349 (patch)
tree75b884349601e43cdf1b8763ee037a6cb09d750b /converter/adb_usb/config.h
parentd8ce19abd06ee9274cee883a379504eba9b470a5 (diff)
Change keymap of ADB converter.
Diffstat (limited to 'converter/adb_usb/config.h')
-rw-r--r--converter/adb_usb/config.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/converter/adb_usb/config.h b/converter/adb_usb/config.h
index 52d5925a50..875c48ce84 100644
--- a/converter/adb_usb/config.h
+++ b/converter/adb_usb/config.h
@@ -35,12 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking Caps Lock support */
#define MATRIX_HAS_LOCKING_CAPS
-
-/* key combination for command */
-#define IS_COMMAND() ( \
- keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_LCTRL) | MOD_BIT(KB_LALT) | MOD_BIT(KB_LGUI)) || \
- keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)) \
-)
+#define MATRIX_ROW(code) ((code)>>3&0x0F)
+#define MATRIX_COL(code) ((code)&0x07)
/* mouse keys */
@@ -49,19 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
-/* PS/2 mouse */
-#ifdef PS2_MOUSE_ENABLE
-# define PS2_CLOCK_PORT PORTF
-# define PS2_CLOCK_PIN PINF
-# define PS2_CLOCK_DDR DDRF
-# define PS2_CLOCK_BIT 0
-# define PS2_DATA_PORT PORTF
-# define PS2_DATA_PIN PINF
-# define PS2_DATA_DDR DDRF
-# define PS2_DATA_BIT 1
-#endif
-
-
/* ADB port setting */
#define ADB_PORT PORTF
#define ADB_PIN PINF
@@ -69,4 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ADB_DATA_BIT 0
//#define ADB_PSW_BIT 1 // optional
+/* key combination for command */
+#include "adb.h"
+#define IS_COMMAND() ( \
+ matrix_is_on(MATRIX_ROW(ADB_POWER), MATRIX_COL(ADB_POWER)) \
+)
+
#endif