]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/adb_usb/config.h
Fix debouncing on gh60, hbkb, macway
[max/tmk_keyboard.git] / converter / adb_usb / config.h
index 52d5925a508e43bd9c50da1a5f10bc6e64bf0fd7..da87eed6a7df8a021056293e228f53508c03a6ac 100644 (file)
@@ -32,15 +32,20 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define MATRIX_ROWS 16  // keycode bit: 3-0
 #define MATRIX_COLS 8   // keycode bit: 6-4
 
+#define MATRIX_ROW(code)    ((code)>>3&0x0F)
+#define MATRIX_COL(code)    ((code)&0x07)
+
+
 /* Locking Caps Lock support */
-#define MATRIX_HAS_LOCKING_CAPS
+//#define MATRIX_HAS_LOCKING_CAPS
+/* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */
+#define CAPSLOCK_LOCKING_ENABLE
+/* Locking CapsLock resynchronize hack */
+#define CAPSLOCK_LOCKING_RESYNC_ENABLE
 
 
-/* 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)) \
-)
+/* legacy keymap support */
+#define USE_LEGACY_KEYMAP
 
 
 /* mouse keys */
@@ -49,19 +54,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 +61,11 @@ 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"
+#include "matrix.h"
+#define IS_COMMAND() ( \
+    matrix_is_on(MATRIX_ROW(ADB_POWER), MATRIX_COL(ADB_POWER)) \
+)
+
 #endif