Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bocaj - Create Userspace and Ergodox Layout #3750

Merged
merged 22 commits into from
Aug 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
59c6870
Bocaj Layout Revamp
JacobJerrell Apr 10, 2018
eeba0ce
Pull in Upstream (#1)
JacobJerrell Apr 11, 2018
b17fa50
Revert "Pull in Upstream (#1)"
JacobJerrell Apr 11, 2018
0a945eb
Merge pull request #2 from JacobJerrell/revert-1-master
JacobJerrell Apr 11, 2018
9b7e1e9
Merge pull request #3 from qmk/master
JacobJerrell Apr 11, 2018
3aaab4e
Updates to Bocaj Files
JacobJerrell Apr 20, 2018
6211b78
Merge remote-tracking branch 'upstream/master'
JacobJerrell May 19, 2018
638c005
Merge remote-tracking branch 'upstream/master'
JacobJerrell May 31, 2018
850f7c6
Merge remote-tracking branch 'upstream/master'
JacobJerrell May 31, 2018
603f9e2
Updates to Bocaj
JacobJerrell Jul 10, 2018
10dd01f
Merge remote-tracking branch 'upstream/master'
JacobJerrell Jul 10, 2018
e106f84
Removed 'secrets.h'
JacobJerrell Jul 10, 2018
b46a20e
Updates to Bocaj
JacobJerrell Jul 10, 2018
b94845e
Merge branch 'master' of https://github.com/JacobJerrell/qmk_firmware
JacobJerrell Jul 10, 2018
cbc7673
Total revisioning of keymap and layout structure
JacobJerrell Jul 24, 2018
59a18c6
Missed readme.md file
JacobJerrell Jul 24, 2018
cb723cc
Merge remote-tracking branch 'upstream/master'
JacobJerrell Jul 25, 2018
9414e91
Bocaj - Permissive Hold setting enabled
JacobJerrell Jul 25, 2018
23898fd
Merge remote-tracking branch 'upstream/master'
JacobJerrell Aug 25, 2018
beb30dd
Switching from ErgoDox EZ centric configuration to the layout/user ap…
JacobJerrell Aug 25, 2018
a4539a7
Bocaj - Create Userspace and Ergodox layout
JacobJerrell Aug 25, 2018
90b1506
Update settings.json
JacobJerrell Aug 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions keyboards/ergodox_ez/keymaps/bocaj/config.h

This file was deleted.

340 changes: 0 additions & 340 deletions keyboards/ergodox_ez/keymaps/bocaj/keymap.c

This file was deleted.

48 changes: 0 additions & 48 deletions keyboards/ergodox_ez/keymaps/bocaj/readme.md

This file was deleted.

6 changes: 6 additions & 0 deletions layouts/community/ergodox/bocaj/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#include QMK_KEYBOARD_CONFIG_H

#undef PRODUCT
#define PRODUCT BocajEZ - Frankensteined ErgoDox EZ
246 changes: 246 additions & 0 deletions layouts/community/ergodox/bocaj/keymap.c

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ COMMAND_ENABLE = no
SWAP_HANDS_ENABLE = no
TAP_DANCE_ENABLE = yes
EXTRAKEY_ENABLE = no
KEY_LOCK_ENABLE = yes
177 changes: 177 additions & 0 deletions users/bocaj/bocaj.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
#include "bocaj.h"
#include "eeprom.h"
#include "version.h"
#include "tap_dances.h"

static uint16_t copy_paste_timer;
userspace_config_t userspace_config;

/* *** *** *** *** *
* Helper Functions *
* *** *** *** *** */
void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };

// Add reconfigurable functions here, for keymap customization
// This allows for a global, userspace functions, and continued
// customization of the keymap. Use _keymap instead of _user
// functions in the keymaps
__attribute__ ((weak))
void matrix_init_keymap(void) {}

__attribute__ ((weak))
void startup_keymap(void) {}

__attribute__ ((weak))
void suspend_power_down_keymap(void) {}

__attribute__ ((weak))
void suspend_wakeup_init_keymap(void) {}

__attribute__ ((weak))
void matrix_scan_keymap(void) {}

__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}

__attribute__ ((weak))
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
return true;
}


__attribute__ ((weak))
uint32_t layer_state_set_keymap (uint32_t state) {
return state;
}

__attribute__ ((weak))
uint32_t default_layer_state_set_keymap (uint32_t state) {
return state;
}

__attribute__ ((weak))
void led_set_keymap(uint8_t usb_led) {}

// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);
matrix_init_keymap();
}

void startup_user (void) {
startup_keymap();
}

void suspend_power_down_user(void)
{
suspend_power_down_keymap();
}

void suspend_wakeup_init_user(void)
{
suspend_wakeup_init_keymap();
#ifdef KEYBOARD_ergodox_ez
wait_ms(10);
#endif
}

// No global matrix scan code, so just run keymap's matrix
// scan function
void matrix_scan_user(void) {
static bool has_ran_yet;
if (!has_ran_yet) {
has_ran_yet = true;
startup_user();
}

#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
#endif // TAP_DANCE_ENABLE

matrix_scan_keymap();
}

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
/* uint8_t default_layer = 0;
default_layer = eeconfig_read_default_layer(); */
switch (keycode) {
case JJ_COPY:
if (!record->event.pressed) {
SEND_STRING(SS_LGUI("c"));
}
return false;
break;
case JJ_PSTE:
if (!record->event.pressed) {
SEND_STRING(SS_LGUI("v"));
}
return false;
break;
case JJ_ARRW:
if (!record->event.pressed) {
SEND_STRING("->");
}
return false;
break; /*
case KC_SWRK:
if (!record->event.pressed) {
set_single_persistent_default_layer(_SWRKMN);
layer_move(default_layer);
//ergodox_blink_all_leds();
//ergodox_blink_all_leds();
}
return false;
break;
case KC_HWRK:
if (!record->event.pressed) {
set_single_persistent_default_layer(_HWRKMN);
layer_move(default_layer);
//ergodox_blink_all_leds();
//ergodox_blink_all_leds();
}
return false;
break;
case KC_EPRM:
if (!record->event.pressed) {
//ergodox_blink_all_leds();
eeconfig_init();
}
return false;
break;
case MC_LOCK:
if (!record->event.pressed) {
layer_move(default_layer);
SEND_STRING(SS_LCTRL(SS_LGUI("q")));
}
return false;
break; */
case KC_DCLR:
#ifdef TAP_DANCE_ENABLE
if (record->event.pressed) {
uint8_t dtime;
for (dtime = 0; dtime < 4; dtime++) {
diablo_key_time[dtime] = diablo_times[0];
}
}
#endif // !TAP_DANCE_ENABLE
return false;
break;
case KC_CCCV:
if (record->event.pressed) {
copy_paste_timer = timer_read();
} else {
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
SEND_STRING(SS_LGUI("c"));
} else {
SEND_STRING(SS_LGUI("v"));
}
}
return false;
break;
}
return process_record_keymap(keycode, record);
}

Loading