working screen in quarters

pull/18/head
Jesse Vincent 11 years ago
parent 8b61b2b757
commit 3b61d548c0

@ -288,6 +288,8 @@ void _transform_and_move_abs(int x, int y) {
Serial.print(", ");
Serial.print(y);
Serial.print("\n");
x = x * 0.85 + 32767 * 0.07;
y = y * 0.85 + 32767 * 0.07;
Mouse.moveAbs(x,y,0);
}
@ -295,7 +297,7 @@ void _transform_and_move_abs(int x, int y) {
int abs_left = 0;
int abs_right = 32767;
int abs_top = 0;
int abs_bottom =32767;
int abs_bottom = 32767;
int next_width;
int next_height;
@ -317,9 +319,8 @@ void begin_warping() {
void warp_mouse(Key ninth) {
// 1 2 3
// 4 5 6
// 7 8 9
// 1 2
// 3 4
if (is_warping == false) {
@ -347,8 +348,8 @@ void warp_mouse(Key ninth) {
Serial.print(section_top+next_height);
next_width = next_width / 3;
next_height = next_height/3;
next_width = next_width / 2;
next_height = next_height/2;
@ -362,9 +363,6 @@ void warp_mouse(Key ninth) {
Serial.print(" - up ");
} else if (ninth.rawKey & MOUSE_DN) {
Serial.print(" - down ");
section_top = section_top + (next_height * 2);
} else {
Serial.print(" - vcenter ");
section_top = section_top + next_height;
}
@ -372,9 +370,6 @@ void warp_mouse(Key ninth) {
Serial.print(" - left ");
} else if (ninth.rawKey & MOUSE_R) {
Serial.print(" - right ");
section_left = section_left + (next_width * 2);
} else {
Serial.print(" - center horizontal ");
section_left = section_left + next_width;
}

@ -2,7 +2,7 @@
#BOARD_TAG = keyboardio
BOARD = micro
PORT = /dev/cu.usbmodem1411
PORT = /dev/cu.usbmodem1421
ARDUINO_LIBS =
#ARDUINO_CORE_PATH = hardware/keyboardio/cores/keyboardio
#ALTERNATE_CORE = keyboardio

@ -43,16 +43,11 @@
#define Key_macroKey1 (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MACRO, 1}
#define Key_mouseWarp1 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_UP | MOUSE_L }
#define Key_mouseWarp2 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_UP }
#define Key_mouseWarp3 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_UP | MOUSE_R }
#define Key_mouseWarp4 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_L }
#define Key_mouseWarp5 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP }
#define Key_mouseWarp6 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP | MOUSE_R }
#define Key_mouseWarp7 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_DN | MOUSE_L }
#define Key_mouseWarp8 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_DN }
#define Key_mouseWarp9 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_DN | MOUSE_R }
#define Key_mouseWarp0 (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_END_WARP}
#define Key_mouseWarpNW (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_UP | MOUSE_L }
#define Key_mouseWarpNE (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_UP | MOUSE_R }
#define Key_mouseWarpSW (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_DN | MOUSE_L }
#define Key_mouseWarpSE (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_DN | MOUSE_R }
#define Key_mouseWarpEnd (Key){ KEY_FLAGS|MOUSE_KEY, MOUSE_WARP| MOUSE_END_WARP}

@ -23,10 +23,10 @@
{Key_LGUI, Key_E, Key_LShift, Key_Backspace, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\
},
#define KEYMAP_NUMPAD { /* Generated keymap for NUMPAD */ {Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_7, Key_8, Key_9, Key_skip, Key_skip},\
{Key_skip, Key_skip, Key_skip, Key_mouseWarp1, Key_mouseWarp2, Key_mouseWarp3, Key_skip, Key_skip, Key_skip, Key_4, Key_5, Key_6, Key_Minus, Key_skip},\
{Key_PageUp, Key_skip, Key_skip, Key_mouseWarp4, Key_mouseWarp5, Key_mouseWarp6, Key_Tab, Key_Return, Key_skip, Key_1, Key_2, Key_3, Key_skip, Key_Equals},\
{Key_PageDn, Key_skip, Key_skip, Key_mouseWarp7, Key_mouseWarp8, Key_mouseWarp9, Key_mouseWarp0, Key_Enter, Key_skip, Key_0, Key_Comma, Key_Period, Key_Enter, Key_skip},\
{Key_LGUI, Key_Backspace, Key_LShift, Key_LCtrl, Key_KeymapNext_Momentary, Key_skip, Key_skip, Key_skip, Key_skip, Key_KeymapNext_Momentary, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\
{Key_skip, Key_skip, Key_skip, Key_mouseWarpNW, Key_mouseWarpNE, Key_skip, Key_skip, Key_skip, Key_skip, Key_4, Key_5, Key_6, Key_Minus, Key_skip},\
{Key_PageUp, Key_skip, Key_skip, Key_mouseWarpSW, Key_mouseWarpSE, Key_skip, Key_Tab, Key_Return, Key_skip, Key_1, Key_2, Key_3, Key_Keymap0, Key_Equals},\
{Key_PageDn, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_mouseWarpEnd, Key_Keymap0, Key_skip, Key_0, Key_Comma, Key_Period, Key_Enter, Key_skip},\
{Key_LGUI, Key_Backspace, Key_LShift, Key_LCtrl, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_skip, Key_RCtrl, Key_RShift, Key_Space, Key_RAlt},\
},
#define KEYMAP_QWERTY { /* Generated keymap for QWERTY */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\
{Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_skip, Key_skip, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\
@ -45,8 +45,8 @@
static const Key keymaps[KEYMAPS][ROWS][COLS] = {
KEYMAP_QWERTY
KEYMAP_GENERIC_FN2
KEYMAP_NUMPAD
KEYMAP_COLEMAK
KEYMAP_NUMPAD
KEYMAP_DVORAK
KEYMAP_GENERIC_FN2
KEYMAP_WORKMAN

@ -3,8 +3,8 @@
static const Key keymaps[KEYMAPS][ROWS][COLS] = {
KEYMAP_QWERTY
KEYMAP_GENERIC_FN2
KEYMAP_NUMPAD
KEYMAP_COLEMAK
KEYMAP_NUMPAD
KEYMAP_DVORAK
KEYMAP_GENERIC_FN2
KEYMAP_WORKMAN

@ -1,6 +1,6 @@
#NAME: NUMPAD
skip skip skip skip skip skip skip skip skip 7 8 9 skip skip
skip skip skip mouseWarp1 mouseWarp2 mouseWarp3 skip skip skip 4 5 6 - skip
PageUp skip skip mouseWarp4 mouseWarp5 mouseWarp6 Tab Return skip 1 2 3 skip =
PageDn skip skip mouseWarp7 mouseWarp8 mouseWarp9 mouseWarp0 Enter skip 0 , . Enter skip
LGUI Backspace LShift LCtrl KeymapNext_Momentary skip skip skip skip KeymapNext_Momentary RCtrl RShift Space RAlt
skip skip skip mouseWarpNW mouseWarpNE skip skip skip skip 4 5 6 - skip
PageUp skip skip mouseWarpSW mouseWarpSE skip Tab Return skip 1 2 3 Keymap0 =
PageDn skip skip skip skip skip mouseWarpEnd Keymap0 skip 0 , . Enter skip
LGUI Backspace LShift LCtrl skip skip skip skip skip skip RCtrl RShift Space RAlt

Loading…
Cancel
Save