forked from kofal.net/zmk
Implement raise/lower for default keymap.
* Properly allow includes for keymaps to allow defining custom keycodes, and then adding them to the keymap.overlay file. * Fix keymap.c loading after build refactor. * Fix for deactivating a layer working properly. * Fix default keymap to put transparent in proper spots to make raise/lower keycodes work as expected. * Add custom raise/lower keycode handling to default keymap.
This commit is contained in:
@@ -76,13 +76,19 @@ foreach(root ${BOARD_ROOT})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_path(KEYMAP_DIR
|
||||
find_path(BASE_KEYMAPS_DIR
|
||||
NAMES ${KEYMAP}/keymap.overlay
|
||||
PATHS ${KEYMAP_DIRS}
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if (KEYMAP_DIR)
|
||||
message(STATUS "Using keymap directory: ${KEYMAP_DIR}/${KEYMAP}/")
|
||||
set(DTC_OVERLAY_FILE ${KEYMAP_DIR}/${KEYMAP}/keymap.overlay)
|
||||
if (BASE_KEYMAPS_DIR)
|
||||
set(KEYMAP_DIR "${BASE_KEYMAPS_DIR}/${KEYMAP}" CACHE STRING "Selected keymap directory")
|
||||
message(STATUS "Using keymap directory: ${KEYMAP_DIR}/")
|
||||
# Used to let local imports of custom keycodes work as expected
|
||||
list(APPEND DTS_ROOT ${KEYMAP_DIR})
|
||||
if (EXISTS "${KEYMAP_DIR}/include")
|
||||
include_directories("${KEYMAP_DIR}/include")
|
||||
endif()
|
||||
set(DTC_OVERLAY_FILE ${KEYMAP_DIR}/keymap.overlay)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user