- Added integration of IBM Trackpoint
This commit is contained in:
@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "nodebug.h"
|
||||
#endif
|
||||
|
||||
int tp_buttons;
|
||||
|
||||
#ifdef FAUXCLICKY_ENABLE
|
||||
#include <fauxclicky.h>
|
||||
#endif
|
||||
@ -311,11 +313,35 @@ void process_action(keyrecord_t *record, action_t action)
|
||||
/* Mouse key */
|
||||
case ACT_MOUSEKEY:
|
||||
if (event.pressed) {
|
||||
mousekey_on(action.key.code);
|
||||
mousekey_send();
|
||||
switch (action.key.code) {
|
||||
case KC_MS_BTN1:
|
||||
tp_buttons |= (1<<0);
|
||||
break;
|
||||
case KC_MS_BTN2:
|
||||
tp_buttons |= (1<<1);
|
||||
break;
|
||||
case KC_MS_BTN3:
|
||||
tp_buttons |= (1<<2);
|
||||
break;
|
||||
default:
|
||||
mousekey_on(action.key.code);
|
||||
mousekey_send();
|
||||
}
|
||||
} else {
|
||||
mousekey_off(action.key.code);
|
||||
mousekey_send();
|
||||
switch (action.key.code) {
|
||||
case KC_MS_BTN1:
|
||||
tp_buttons &= ~(1<<0);
|
||||
break;
|
||||
case KC_MS_BTN2:
|
||||
tp_buttons &= ~(1<<1);
|
||||
break;
|
||||
case KC_MS_BTN3:
|
||||
tp_buttons &= ~(1<<2);
|
||||
break;
|
||||
default:
|
||||
mousekey_off(action.key.code);
|
||||
mousekey_send();
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user