mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-03 14:14:17 -04:00
Finishing removing automouse
- Testing out the toggle mouse layer instead, so far it's okay
This commit is contained in:
parent
57937cb5f3
commit
2f6929eae1
8 changed files with 5 additions and 63 deletions
|
@ -1,5 +1,4 @@
|
||||||
# override userspace defaults
|
# override userspace defaults
|
||||||
HOST_STATE_AUTO_MOUSE = no
|
|
||||||
|
|
||||||
# override keyboard defaults
|
# override keyboard defaults
|
||||||
# keyboards\bastardkb\info.json
|
# keyboards\bastardkb\info.json
|
||||||
|
|
|
@ -23,6 +23,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#define PLOOPY_DPI_OPTIONS { 300, 550, 800, 1200 }
|
#define PLOOPY_DPI_OPTIONS { 300, 550, 800, 1200 }
|
||||||
#define PLOOPY_DPI_DEFAULT 2
|
#define PLOOPY_DPI_DEFAULT 2
|
||||||
|
|
||||||
//#define POINTING_DEVICE_AUTO_MOUSE_ENABLE
|
|
||||||
//#define AUTO_MOUSE_DEFAULT_LAYER 1
|
|
|
@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[0] = LAYOUT( KC_NO )
|
[0] = LAYOUT( KC_NO )
|
||||||
//, [1] = LAYOUT( KC_NO )
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,37 +31,11 @@ void keyboard_post_init_user(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void pointing_device_init_user(void) {
|
|
||||||
set_auto_mouse_enable(true);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
|
||||||
switch(get_highest_layer(state)) {
|
|
||||||
case 1:
|
|
||||||
if(!host_keyboard_led_state().num_lock) {
|
|
||||||
tap_code16(KC_NUM);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if(host_keyboard_led_state().num_lock) {
|
|
||||||
tap_code16(KC_NUM);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool led_update_user(led_t led_state) {
|
bool led_update_user(led_t led_state) {
|
||||||
|
|
||||||
// when scroll lock is pressed, toggle drag scroll state
|
// when scroll lock is pressed, toggle drag scroll state
|
||||||
if ( scroll_lock_state != led_state.scroll_lock ) {
|
if ( scroll_lock_state != led_state.scroll_lock ) {
|
||||||
toggle_drag_scroll();
|
toggle_drag_scroll();
|
||||||
auto_mouse_reset_trigger(true);
|
|
||||||
scroll_lock_state = led_state.scroll_lock;
|
scroll_lock_state = led_state.scroll_lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ CAPS_WORD_ENABLE = no
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
COMBO_ENABLE = no
|
COMBO_ENABLE = no
|
||||||
KEY_OVERRIDE_ENABLE = no
|
KEY_OVERRIDE_ENABLE = no
|
||||||
HOST_STATE_AUTO_MOUSE = no
|
|
||||||
|
|
||||||
# override keyboard defaults
|
# override keyboard defaults
|
||||||
# keyboards\ploopyco\trackball_nano\info.json
|
# keyboards\ploopyco\trackball_nano\info.json
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#include "hoststateautomouse.h"
|
|
||||||
|
|
||||||
|
|
||||||
// keyboard side code to simulate auto mouse between ploopy nano and qmk keyboard
|
|
||||||
// nano pointer movement activates auto mouse layer, which toggles numlock
|
|
||||||
// when num lock is enabled, keyboard turns on mouse layer
|
|
||||||
bool led_update_user(led_t led_state) {
|
|
||||||
if(host_keyboard_led_state().num_lock) {
|
|
||||||
layer_on(_MOUSE);
|
|
||||||
} else if (!host_keyboard_led_state().num_lock) {
|
|
||||||
layer_off(_MOUSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "t4corun.h"
|
|
|
@ -37,8 +37,6 @@ MOUSEKEY_ENABLE ?= yes
|
||||||
COMBO_ENABLE ?= yes
|
COMBO_ENABLE ?= yes
|
||||||
KEY_OVERRIDE_ENABLE ?= yes
|
KEY_OVERRIDE_ENABLE ?= yes
|
||||||
|
|
||||||
# custom features
|
|
||||||
HOST_STATE_AUTO_MOUSE ?= yes #allows kb to enable mouse layer on Ploopy Nano movement
|
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# include my code that will be common across all my keyboards
|
# include my code that will be common across all my keyboards
|
||||||
|
@ -64,12 +62,8 @@ endif
|
||||||
|
|
||||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||||
SRC += features/oled.c
|
SRC += features/oled.c
|
||||||
endifs
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||||
MUSIC_MODE = no
|
MUSIC_MODE = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#ifeq ($(strip $(HOST_STATE_AUTO_MOUSE)), yes)
|
|
||||||
# SRC += features/hoststateautomouse.c
|
|
||||||
#endif
|
|
|
@ -18,11 +18,9 @@ void setLunaJumped(void) { showedJump = true;}
|
||||||
|
|
||||||
|
|
||||||
// Hold Navigation and Number to get Symbol
|
// Hold Navigation and Number to get Symbol
|
||||||
#if !defined(KEYBOARD_ploopyco)
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
return update_tri_layer_state(state, _NAVIGATION, _NUMBER, _SYMBOL);
|
return update_tri_layer_state(state, _NAVIGATION, _NUMBER, _SYMBOL);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Customize behavior for existing keycodes or create new ones
|
// Customize behavior for existing keycodes or create new ones
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
@ -53,7 +51,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*
|
|
||||||
// makes num lock a hold instead of toggle
|
// makes num lock a hold instead of toggle
|
||||||
// prevents accidental ploopy nano going into bootloader
|
// prevents accidental ploopy nano going into bootloader
|
||||||
case KC_NUM:
|
case KC_NUM:
|
||||||
|
@ -63,7 +61,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
tap_code(KC_NUM);
|
tap_code(KC_NUM);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
*/
|
|
||||||
case KC_SPC:
|
case KC_SPC:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
isJumping = true;
|
isJumping = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue