summaryrefslogtreecommitdiff
path: root/keyboards/handwired/promethium/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/promethium/keymaps')
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/Makefile7
-rwxr-xr-xkeyboards/handwired/promethium/keymaps/priyadi/flash.sh1
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c146
3 files changed, 117 insertions, 37 deletions
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile
index 2f6f27a732..46fdfa0118 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/Makefile
+++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile
@@ -4,16 +4,17 @@
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
-BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
+UNICODEMAP_ENABLE = yes
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
PS2_MOUSE_ENABLE = yes
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
index fb81a54ee0..14a3b43789 100755
--- a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
+++ b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
@@ -1,3 +1,4 @@
#!/bin/sh
+sleep 10
avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index b2da2f97b7..7ae269563f 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -11,6 +11,8 @@
#include "process_unicode.h"
#include "quantum.h"
#include "rgbsps.h"
+#include "ps2_mouse.h"
+#include "ps2.h"
#define COUNT(x) (sizeof (x) / sizeof (*(x)))
// #define RGBLED_NUM 5
@@ -282,25 +284,25 @@ void led_layer_func(void) {
rgbsps_set(LED_K, 15, 0, 15);
rgbsps_set(LED_L, 15, 0, 15);
- rgbsps_set(LED_U, 15, 0, 10);
- rgbsps_set(LED_O, 15, 0, 10);
- rgbsps_set(LED_COMM, 15, 0, 10);
- rgbsps_set(LED_DOT, 15, 0, 10);
- rgbsps_set(LED_SCLN, 15, 0, 10);
- rgbsps_set(LED_P, 15, 0, 10);
-
- rgbsps_set(LED_Q, 10, 0, 15);
- rgbsps_set(LED_W, 10, 0, 15);
- rgbsps_set(LED_E, 10, 0, 15);
- rgbsps_set(LED_R, 10, 0, 15);
- rgbsps_set(LED_A, 10, 0, 15);
- rgbsps_set(LED_S, 10, 0, 15);
- rgbsps_set(LED_D, 10, 0, 15);
- rgbsps_set(LED_F, 10, 0, 15);
- rgbsps_set(LED_Z, 10, 0, 15);
- rgbsps_set(LED_X, 10, 0, 15);
- rgbsps_set(LED_C, 10, 0, 15);
- rgbsps_set(LED_V, 10, 0, 15);
+ rgbsps_set(LED_U, 15, 0, 0);
+ rgbsps_set(LED_O, 15, 0, 0);
+ rgbsps_set(LED_COMM, 15, 0, 0);
+ rgbsps_set(LED_DOT, 15, 0, 0);
+ rgbsps_set(LED_SCLN, 15, 0, 0);
+ rgbsps_set(LED_P, 15, 0, 0);
+
+ rgbsps_set(LED_Q, 0, 15, 0);
+ rgbsps_set(LED_W, 0, 15, 0);
+ rgbsps_set(LED_E, 0, 15, 0);
+ rgbsps_set(LED_R, 0, 15, 0);
+ rgbsps_set(LED_A, 0, 15, 0);
+ rgbsps_set(LED_S, 0, 15, 0);
+ rgbsps_set(LED_D, 0, 15, 0);
+ rgbsps_set(LED_F, 0, 15, 0);
+ rgbsps_set(LED_Z, 0, 15, 0);
+ rgbsps_set(LED_X, 0, 15, 0);
+ rgbsps_set(LED_C, 0, 15, 0);
+ rgbsps_set(LED_V, 0, 15, 0);
rgbsps_send();
}
@@ -361,7 +363,15 @@ void led_layer_num(void) {
}
void led_layer_emoji(void) {
- rgbsps_setall(15, 15, 0);
+ for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
+ rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
+ rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
+ rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0);
+ }
rgbsps_set(LED_IND_FUNC, 0, 0, 0);
rgbsps_set(LED_IND_NUM, 0, 0, 0);
@@ -415,7 +425,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_QWERTY] = KEYMAP(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT ,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT ,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL
),
@@ -432,10 +442,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP(
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
- KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT ,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL
+ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
+ _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Workman
@@ -450,10 +460,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_WORKMAN] = KEYMAP(
- KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC,
- KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT ,
- KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL
+ _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
+ _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
+ _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Punc
@@ -541,7 +551,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_GUI] = KEYMAP(
_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______,
- LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY,
+ LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,KC_PAUS, QWERTY,
WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK,
OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN
),
@@ -572,6 +582,39 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
switch (keycode) {
+ // QWERTZ style comma and dot: semicolon and colon when shifted
+ case KC_COMM:
+ if (record->event.pressed) {
+ bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT);
+ bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT);
+ if (lshifted || rshifted) {
+ if (lshifted) unregister_code(KC_LSFT);
+ if (rshifted) unregister_code(KC_RSFT);
+ register_code(KC_SCLN);
+ unregister_code(KC_SCLN);
+ if (lshifted) register_code(KC_LSFT);
+ if (rshifted) register_code(KC_RSFT);
+ } else {
+ register_code(KC_COMM);
+ unregister_code(KC_COMM);
+ }
+ }
+ return false;
+ break;
+ case KC_DOT:
+ if (record->event.pressed) {
+ if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) {
+ register_code(KC_SCLN);
+ unregister_code(KC_SCLN);
+ } else {
+ register_code(KC_DOT);
+ unregister_code(KC_DOT);
+ }
+ }
+ return false;
+ break;
+
+ // layout switchers
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
@@ -600,8 +643,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
break;
-
-
+ // layer switcher
case PUNC:
if (record->event.pressed) {
layer_on(_PUNC);
@@ -663,7 +705,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
break;
-
+ // OS switchers
case LINUX:
set_unicode_input_mode(UC_LNX);
#ifdef AUDIO_ENABLE
@@ -722,4 +764,40 @@ void shutdown_user()
stop_all_notes();
}
-#endif \ No newline at end of file
+#endif
+
+
+void ps2_mouse_init_user() {
+ uint8_t rcv;
+
+ // set TrackPoint sensitivity
+ PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2");
+ PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81");
+ PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A");
+ PS2_MOUSE_SEND(0x49, "set trackpoint sensitivity: 0x59");
+
+ // set TrackPoint Negative Inertia factor
+ PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2");
+ PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81");
+ PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D");
+ PS2_MOUSE_SEND(0x06, "set negative inertia factor: 0x06");
+
+ // set TrackPoint speed
+ // (transfer function upper plateau speed)
+ PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2");
+ PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81");
+ PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60");
+ PS2_MOUSE_SEND(0x61, "set trackpoint speed: 0x61");
+
+ // inquire pts status
+ rcv = ps2_host_send(0xE2);
+ rcv = ps2_host_send(0x2C);
+ rcv = ps2_host_recv_response();
+ if ((rcv & 1) == 1) {
+ // if on, disable pts
+ rcv = ps2_host_send(0xE2);
+ rcv = ps2_host_send(0x47);
+ rcv = ps2_host_send(0x2C);
+ rcv = ps2_host_send(0x01);
+ }
+} \ No newline at end of file