Skip to content

Commit

Permalink
Suggested Changes part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
daneski13 committed Jan 12, 2023
1 parent f1700e8 commit 5159f2f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
14 changes: 7 additions & 7 deletions keyboards/junco/junco_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ typedef struct {
uint16_t keymap_conf; // Current keymap config
} kb_sync_data_t;
// Saves common data on master and sends it to slave
__attribute__((weak)) bool junco_sync(void) {
bool junco_sync(void) {
// Count how many times retried
static uint8_t retries = 0;
// Allow max retries
Expand All @@ -41,7 +41,7 @@ __attribute__((weak)) bool junco_sync(void) {
return false;
}

uint32_t layer = get_highest_layer(default_layer_state);
uint8_t layer = get_highest_layer(default_layer_state);

/*
Save data to eeprom on master
Expand Down Expand Up @@ -83,7 +83,7 @@ __attribute__((weak)) bool junco_sync(void) {
}
}
// Slave handler for KB_SYNC
__attribute__((weak)) void kb_sync_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
void kb_sync_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
const kb_sync_data_t* m2s = (kb_sync_data_t*)in_data;

/* Save data to eeprom on slave side */
Expand Down Expand Up @@ -126,7 +126,7 @@ void _junco_reset_helper(void) {
soft_reset_keyboard();
}
// Reboots the keyboard, optionally clearing EEPROMs
__attribute__((weak)) void junco_sync_reset(bool* needs_reset, bool* clear_eeprom, bool* failed) {
void junco_sync_reset(bool* needs_reset, bool* clear_eeprom, bool* failed) {
// Count how many times retried
static uint8_t retries = 0;
// Allow max retries until just reseting the master
Expand Down Expand Up @@ -208,7 +208,7 @@ __attribute__((weak)) void junco_sync_reset(bool* needs_reset, bool* clear_eepro
}
}
// Slave handler for KB_SYNC_RESET
__attribute__((weak)) void kb_sync_reset_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
void kb_sync_reset_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
const kb_sync_reset_flags_t* m2s = (kb_sync_reset_flags_t*)in_data;
// Set flags on slave
kb_sync_reset_flags = *m2s;
Expand All @@ -220,7 +220,7 @@ __attribute__((weak)) void kb_sync_reset_slave_handler(uint8_t in_buflen, const
typedef struct {
rgb_config_t config;
} kb_sync_rgb_data_t;
__attribute__((weak)) bool junco_sync_rgb(void) {
bool junco_sync_rgb(void) {
// Count how many times retried
static uint8_t retries = 0;
// Allow max retries
Expand Down Expand Up @@ -259,7 +259,7 @@ __attribute__((weak)) bool junco_sync_rgb(void) {
}
}
// Slave handler for KB_SYNC_RGB
__attribute__((weak)) void kb_sync_rgb_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
void kb_sync_rgb_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
kb_sync_rgb_data_t* s2m = (kb_sync_rgb_data_t*)out_data;
// Update the slave's matrix config in EEPROM.
// The slave and master configs sync on in the core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ On the symbol layer, the right side is a number pad, and the left side contains

Holding down delete within the symbol layer will take you to the adjust layer.

![Junco's Symbol Layer](https://i.imgur.com/6F35Z4W.png)
![Junco's Symbol Layer](https://i.imgur.com/6F35Z4Wh.png)

## Extension Layer

Expand All @@ -36,15 +36,15 @@ On the extension layer, the right side is the function keys in a number-pad-esqu

Holding down backspace within the extension layer will take you to the adjust layer.

![Junco's Extension Layer](https://i.imgur.com/FETcqkC.png)
![Junco's Extension Layer](https://i.imgur.com/FETcqkCh.png)

## Adjust Layer

This layer's theme is adjusting the keyboard's settings, it's accessed by holding down both delete and backspace on the base layer.

On the adjust layer, the right side is the keyboard's settings: clear data, reboot, toggle debug mode, enter the bootloader, and change the base layer between QWERTY and [Colemak-DH](#colemak-dh). The left side adjusts the RGB lighting.

![Junco's Adjust Layer](https://i.imgur.com/fRsdlt3.png)
![Junco's Adjust Layer](https://i.imgur.com/fRsdlt3h.png)

## Colemak-DH

Expand All @@ -54,4 +54,4 @@ QWERTY is default when flashing your keyboard, but you can change it to Colemak-

If you've never heard of it, Colemak is a keyboard layout that was designed to be a more ergonomic, modern, efficient, and comfortable replacement to QWERTY. Colemak was designed to place the most common letters in english on the home row along with many of the most common bigrams together (two letters typed in a row). Colemak-DH is a variant of Colemak that moves D and H to beneath the index fingers rather than the home row since most people find it easier and faster to reach the keys that way rather than the middle of the home row.

![Junco's Colemak-DH Layout](https://i.imgur.com/u5iXszJ.png)
![Junco's Colemak-DH Layout](https://i.imgur.com/u5iXszJh.png)
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ The base layers are the same as the default layout, except the right side's left

QWERTY:

![QWERTY Layer](https://i.imgur.com/vkS9Tce.png)
![QWERTY Layer](https://i.imgur.com/vkS9Tceh.png)

Colemak-DH:

![Colemak-DH Layer](https://i.imgur.com/5YYgaUA.png)
![Colemak-DH Layer](https://i.imgur.com/5YYgaUAh.png)

## Symbol Layer

Symbol layer is identical to the default layout.

![Symbol Layer](https://i.imgur.com/6F35Z4W.png)
![Symbol Layer](https://i.imgur.com/6F35Z4Wh.png)

## Extension Layer

Encoders on the right side become undo/redo and scrolling horizontally by word.

![Extension Layer](https://i.imgur.com/0VCStS8.png)
![Extension Layer](https://i.imgur.com/0VCStS8h.png)

## Adjust Layer

Pressing "Stick Adj Layer" will "stick" the adjust layer so you can use the rotary encoders for RGB settings rather than holding down both backspace and delete. To go back to the default layer, press that stick key again or press and release either Del or Backspace. When the adjust layer is currently "sticky" the sticky key will become the indicator color mentioned earlier.

"Toggle Base" will toggle between QWERTY and Colemak-DH, toggle OS will toggle between macOS and Windows key-mappings (swapping WIN/Command with Alt/Option by the thumb keys and properly mapping redo/word scrolling), "VIA Sync" will sync the VIA settings between the keyboard halves (there isn't a way to do this automatically), and "Toggle Junco Sync" will disable/enable Junco Sync.

![Adjust layer](https://i.imgur.com/fRsdlt3.png)
![Adjust layer](https://i.imgur.com/fRsdlt3h.png)
3 changes: 1 addition & 2 deletions keyboards/junco/README.md → keyboards/junco/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Junco <!-- omit from toc -->

![Junco](https://i.imgur.com/WzZaIgQ.jpg)
![Junco](https://i.imgur.com/WzZaIgQh.jpg)

Junco is a 60% Raspberry Pi Pico powered split keyboard boasting a 4x6 layout with an aggressive columnar stagger. It has 5 "thumb" keys on either side, support for 2-4 rotary encoders, and per-key RGB lighting.

Expand Down Expand Up @@ -159,4 +159,3 @@ If for some reason your sync isn't working, try setting the flag on the key's re

- You can directly call Junco Sync functions by including the `junco_sync.h` header file in your `keymap.c`.
- Even after calling `junco_sync_disable()`, you can still manually sync data between the halves by calling Junco Sync functions directly within your `housekeeping_task_user`. `junco.c` can give you some ideas on how to do this.
- All of the Junco Sync's functions are weakly defined so you can override them if you really want to.

0 comments on commit 5159f2f

Please sign in to comment.