Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ab0c2eb72 | ||
|
|
2e73bb9ea1 | ||
|
|
e5ac605b4c | ||
|
|
fb220038b7 | ||
|
|
464c56f599 | ||
|
|
a59b43b433 | ||
|
|
ceb2f3de00 | ||
|
|
5cd4030a93 | ||
|
|
21ae72dd9e | ||
|
|
dba61c6a42 | ||
|
|
f61acc483b | ||
|
|
fb38e4099b | ||
|
|
5fe19abe06 | ||
|
|
06e34fdcbc | ||
|
|
cc6666b96d |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
|
||||
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to the [UHK Versioning](VERSIONING.md) conventions.
|
||||
|
||||
## [8.5.4] - 2018-01-05
|
||||
|
||||
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||
|
||||
- Make the modifiers of shortcut keys stick only as long as the layer switcher key of a shortcut key is being held.
|
||||
|
||||
## [8.5.3] - 2018-10-20
|
||||
|
||||
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||
|
||||
- Re-enable the I2C watchdog of the left keyboard half which was accidentally disabled starting from firmware 8.4.3. This should fix the freezes of the left keyboard half.
|
||||
|
||||
## [8.5.2] - 2018-10-06
|
||||
|
||||
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||
|
||||
- Don't suppress keys upon keymap change.
|
||||
|
||||
## [8.5.1] - 2018-10-04
|
||||
|
||||
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
If you're using Karabiner Elements on your Mac, then stop here! Make sure to close Karabiner Elements, then try to reproduce the issue again, even if you think that Karabiner Elements shouldn't be the cause. Karabiner Elements is the source of numerous problems, and we don't want to receive any more reports it causes.
|
||||
Before submitting a new issue, make sure to do the following:
|
||||
|
||||
1. If you're using Karabiner Elements on your Mac, close it!
|
||||
2. Install the latest Agent:
|
||||
https://github.com/UltimateHackingKeyboard/agent/releases/latest
|
||||
3. Use Agent to update to the latest firmware:
|
||||
https://github.com/UltimateHackingKeyboard/firmware/releases/latest
|
||||
4. Try to reproduce the issue, and only report it if it still persists.
|
||||
|
||||
@@ -25,3 +25,10 @@ Going forward, it's easier to flash the firmware of your choice by using the dow
|
||||
## Contributing
|
||||
|
||||
Want to contribute? Let us show you [how](/CONTRIBUTING.md).
|
||||
|
||||
## Custom Firmwares
|
||||
|
||||
The following list contains unofficial forks of the firmware. These forks provide functionality unavailable in the official firmware, but come without guarantees of any kind:
|
||||
|
||||
- [https://github.com/kareltucek/firmware](https://github.com/kareltucek/firmware) - firmware featuring macro engine extended by a set of custom commands, allowing more advanced configurations including custom layer switching logic, doubletap bindings, alternative secondary roles etc.
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
void KEY_SCANNER_HANDLER(void)
|
||||
{
|
||||
KeyMatrix_ScanRow(&keyMatrix);
|
||||
#ifdef I2C_WATCHDOG
|
||||
RunWatchdog();
|
||||
#endif
|
||||
LPTMR_ClearStatusFlags(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerCompareFlag);
|
||||
}
|
||||
|
||||
|
||||
Submodule lib/agent updated: 6e2b1fb18d...1eb8720305
@@ -13,7 +13,6 @@
|
||||
uint8_t timestamp;
|
||||
bool previous : 1;
|
||||
bool current : 1;
|
||||
bool suppressed : 1;
|
||||
bool debouncing : 1;
|
||||
} key_state_t;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "config_parser/parse_keymap.h"
|
||||
#include "config_parser/config_globals.h"
|
||||
#include "macros.h"
|
||||
#include "usb_report_updater.h"
|
||||
|
||||
keymap_reference_t AllKeymaps[MAX_KEYMAP_NUM] = {
|
||||
{
|
||||
@@ -25,7 +24,6 @@ void SwitchKeymapById(uint8_t index)
|
||||
ValidatedUserConfigBuffer.offset = AllKeymaps[index].offset;
|
||||
ParseKeymap(&ValidatedUserConfigBuffer, index, AllKeymapsCount, AllMacrosCount);
|
||||
LedDisplay_UpdateText();
|
||||
KeymapChanged = true;
|
||||
}
|
||||
|
||||
bool SwitchKeymapByAbbreviation(uint8_t length, char *abbrev)
|
||||
|
||||
@@ -15,7 +15,7 @@ void updateLayerStates(void)
|
||||
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
||||
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
||||
key_state_t *keyState = &KeyStates[slotId][keyId];
|
||||
if (keyState->current && !keyState->suppressed) {
|
||||
if (keyState->current) {
|
||||
key_action_t action = CurrentKeymap[LayerId_Base][slotId][keyId];
|
||||
if (action.type == KeyActionType_SwitchLayer) {
|
||||
if (action.switchLayer.mode != SwitchLayerMode_Toggle) {
|
||||
@@ -70,3 +70,14 @@ layer_id_t GetActiveLayer()
|
||||
|
||||
return heldLayer;
|
||||
}
|
||||
|
||||
bool IsLayerHeld(void)
|
||||
{
|
||||
for (layer_id_t layerId = LayerId_Mod; layerId <= LayerId_Mouse; layerId++) {
|
||||
if (heldLayers[layerId]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
layer_id_t GetActiveLayer();
|
||||
layer_id_t GetActiveLayer(void);
|
||||
bool IsLayerHeld(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,8 +25,7 @@ static uint16_t DoubleTapSwitchLayerReleaseTimeout = 200;
|
||||
|
||||
static bool activeMouseStates[ACTIVE_MOUSE_STATES_COUNT];
|
||||
bool TestUsbStack = false;
|
||||
bool KeymapChanged = false;
|
||||
static uint8_t layerCache[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
|
||||
static key_action_t actionCache[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
|
||||
|
||||
volatile uint8_t UsbReportUpdateSemaphore = 0;
|
||||
|
||||
@@ -238,72 +237,84 @@ static void handleSwitchLayerAction(key_state_t *keyState, key_action_t *action)
|
||||
static uint8_t basicScancodeIndex = 0;
|
||||
static uint8_t mediaScancodeIndex = 0;
|
||||
static uint8_t systemScancodeIndex = 0;
|
||||
static uint8_t stickyModifiers;
|
||||
static uint8_t stickyModifiers, stickySlotId, stickyKeyId;
|
||||
static uint8_t secondaryRoleState = SecondaryRoleState_Released;
|
||||
static uint8_t secondaryRoleSlotId;
|
||||
static uint8_t secondaryRoleKeyId;
|
||||
static secondary_role_t secondaryRole;
|
||||
|
||||
static void applyKeyAction(key_state_t *keyState, key_action_t *action)
|
||||
static void applyKeyAction(key_state_t *keyState, key_action_t *action, uint8_t slotId, uint8_t keyId)
|
||||
{
|
||||
if (keyState->suppressed) {
|
||||
return;
|
||||
}
|
||||
if (keyState->current) {
|
||||
handleSwitchLayerAction(keyState, action);
|
||||
|
||||
handleSwitchLayerAction(keyState, action);
|
||||
|
||||
switch (action->type) {
|
||||
case KeyActionType_Keystroke:
|
||||
if (action->keystroke.scancode) {
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = action->keystroke.modifiers;
|
||||
switch (action->type) {
|
||||
case KeyActionType_Keystroke:
|
||||
if (action->keystroke.scancode) {
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = action->keystroke.modifiers;
|
||||
stickySlotId = slotId;
|
||||
stickyKeyId = keyId;
|
||||
}
|
||||
} else {
|
||||
ActiveUsbBasicKeyboardReport->modifiers |= action->keystroke.modifiers;
|
||||
}
|
||||
} else {
|
||||
ActiveUsbBasicKeyboardReport->modifiers |= action->keystroke.modifiers;
|
||||
}
|
||||
switch (action->keystroke.keystrokeType) {
|
||||
case KeystrokeType_Basic:
|
||||
if (basicScancodeIndex >= USB_BASIC_KEYBOARD_MAX_KEYS || action->keystroke.scancode == 0) {
|
||||
switch (action->keystroke.keystrokeType) {
|
||||
case KeystrokeType_Basic:
|
||||
if (basicScancodeIndex >= USB_BASIC_KEYBOARD_MAX_KEYS || action->keystroke.scancode == 0) {
|
||||
break;
|
||||
}
|
||||
ActiveUsbBasicKeyboardReport->scancodes[basicScancodeIndex++] = action->keystroke.scancode;
|
||||
break;
|
||||
}
|
||||
ActiveUsbBasicKeyboardReport->scancodes[basicScancodeIndex++] = action->keystroke.scancode;
|
||||
break;
|
||||
case KeystrokeType_Media:
|
||||
if (mediaScancodeIndex >= USB_MEDIA_KEYBOARD_MAX_KEYS) {
|
||||
case KeystrokeType_Media:
|
||||
if (mediaScancodeIndex >= USB_MEDIA_KEYBOARD_MAX_KEYS) {
|
||||
break;
|
||||
}
|
||||
ActiveUsbMediaKeyboardReport->scancodes[mediaScancodeIndex++] = action->keystroke.scancode;
|
||||
break;
|
||||
}
|
||||
ActiveUsbMediaKeyboardReport->scancodes[mediaScancodeIndex++] = action->keystroke.scancode;
|
||||
break;
|
||||
case KeystrokeType_System:
|
||||
if (systemScancodeIndex >= USB_SYSTEM_KEYBOARD_MAX_KEYS) {
|
||||
case KeystrokeType_System:
|
||||
if (systemScancodeIndex >= USB_SYSTEM_KEYBOARD_MAX_KEYS) {
|
||||
break;
|
||||
}
|
||||
ActiveUsbSystemKeyboardReport->scancodes[systemScancodeIndex++] = action->keystroke.scancode;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case KeyActionType_Mouse:
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = 0;
|
||||
}
|
||||
activeMouseStates[action->mouseAction] = true;
|
||||
break;
|
||||
case KeyActionType_SwitchLayer:
|
||||
// Handled by handleSwitchLayerAction()
|
||||
break;
|
||||
case KeyActionType_SwitchKeymap:
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = 0;
|
||||
secondaryRoleState = SecondaryRoleState_Released;
|
||||
SwitchKeymapById(action->switchKeymap.keymapId);
|
||||
}
|
||||
break;
|
||||
case KeyActionType_PlayMacro:
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = 0;
|
||||
Macros_StartMacro(action->playMacro.macroId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (action->type) {
|
||||
case KeyActionType_Keystroke:
|
||||
if (keyState->previous) {
|
||||
if (slotId == stickySlotId && keyId == stickyKeyId) {
|
||||
if (!IsLayerHeld() && !(secondaryRoleState == SecondaryRoleState_Triggered && IS_SECONDARY_ROLE_LAYER_SWITCHER(secondaryRole))) {
|
||||
stickyModifiers = 0;
|
||||
}
|
||||
}
|
||||
ActiveUsbSystemKeyboardReport->scancodes[systemScancodeIndex++] = action->keystroke.scancode;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case KeyActionType_Mouse:
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = 0;
|
||||
}
|
||||
activeMouseStates[action->mouseAction] = true;
|
||||
break;
|
||||
case KeyActionType_SwitchLayer:
|
||||
// Handled by handleSwitchLayerAction()
|
||||
break;
|
||||
case KeyActionType_SwitchKeymap:
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = 0;
|
||||
secondaryRoleState = SecondaryRoleState_Released;
|
||||
SwitchKeymapById(action->switchKeymap.keymapId);
|
||||
}
|
||||
break;
|
||||
case KeyActionType_PlayMacro:
|
||||
if (!keyState->previous) {
|
||||
stickyModifiers = 0;
|
||||
Macros_StartMacro(action->playMacro.macroId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,8 +346,6 @@ static void updateActiveUsbReports(void)
|
||||
if (layerChanged) {
|
||||
stickyModifiers = 0;
|
||||
}
|
||||
bool keymapChangedLastCycle = KeymapChanged;
|
||||
KeymapChanged = false;
|
||||
LedDisplay_SetLayer(activeLayer);
|
||||
|
||||
if (TestUsbStack) {
|
||||
@@ -383,38 +392,36 @@ static void updateActiveUsbReports(void)
|
||||
secondaryRoleState = SecondaryRoleState_Triggered;
|
||||
keyState->current = false;
|
||||
} else {
|
||||
layerCache[slotId][keyId] = activeLayer;
|
||||
actionCache[slotId][keyId] = CurrentKeymap[activeLayer][slotId][keyId];
|
||||
}
|
||||
}
|
||||
|
||||
action = &CurrentKeymap[layerCache[slotId][keyId]][slotId][keyId];
|
||||
action = &actionCache[slotId][keyId];
|
||||
|
||||
if (keyState->current) {
|
||||
if ((KeymapChanged || keymapChangedLastCycle) && keyState->previous) {
|
||||
keyState->suppressed = true;
|
||||
} else if (action->type == KeyActionType_Keystroke && action->keystroke.secondaryRole) {
|
||||
if (action->type == KeyActionType_Keystroke && action->keystroke.secondaryRole) {
|
||||
// Press released secondary role key.
|
||||
if (!keyState->previous && secondaryRoleState == SecondaryRoleState_Released) {
|
||||
secondaryRoleState = SecondaryRoleState_Pressed;
|
||||
secondaryRoleSlotId = slotId;
|
||||
secondaryRoleKeyId = keyId;
|
||||
secondaryRole = action->keystroke.secondaryRole;
|
||||
keyState->suppressed = true;
|
||||
}
|
||||
} else {
|
||||
applyKeyAction(keyState, action);
|
||||
applyKeyAction(keyState, action, slotId, keyId);
|
||||
}
|
||||
} else {
|
||||
keyState->suppressed = false;
|
||||
|
||||
// Release secondary role key.
|
||||
if (keyState->previous && secondaryRoleSlotId == slotId && secondaryRoleKeyId == keyId) {
|
||||
if (keyState->previous && secondaryRoleSlotId == slotId && secondaryRoleKeyId == keyId && secondaryRoleState != SecondaryRoleState_Released) {
|
||||
// Trigger primary role.
|
||||
if (secondaryRoleState == SecondaryRoleState_Pressed) {
|
||||
keyState->previous = false;
|
||||
applyKeyAction(keyState, action);
|
||||
keyState->current = true;
|
||||
applyKeyAction(keyState, action, slotId, keyId);
|
||||
}
|
||||
secondaryRoleState = SecondaryRoleState_Released;
|
||||
} else {
|
||||
applyKeyAction(keyState, action, slotId, keyId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
extern uint32_t UsbReportUpdateCounter;
|
||||
extern volatile uint8_t UsbReportUpdateSemaphore;
|
||||
extern bool TestUsbStack;
|
||||
extern bool KeymapChanged;
|
||||
|
||||
// Functions:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"commander": "^2.11.0",
|
||||
"shelljs": "^0.7.8"
|
||||
},
|
||||
"firmwareVersion": "8.5.1",
|
||||
"firmwareVersion": "8.5.4",
|
||||
"deviceProtocolVersion": "4.5.0",
|
||||
"moduleProtocolVersion": "4.0.0",
|
||||
"userConfigVersion": "4.1.0",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#define FIRMWARE_MAJOR_VERSION 8
|
||||
#define FIRMWARE_MINOR_VERSION 5
|
||||
#define FIRMWARE_PATCH_VERSION 1
|
||||
#define FIRMWARE_PATCH_VERSION 4
|
||||
|
||||
#define DEVICE_PROTOCOL_MAJOR_VERSION 4
|
||||
#define DEVICE_PROTOCOL_MINOR_VERSION 5
|
||||
|
||||
Reference in New Issue
Block a user