Skip to content

Instantly share code, notes, and snippets.

Lulu keyboard logos and default layers

I use my Lulu split keyboard with both Mac and Windows, and use a separate default layer for each OS. My default Mac/Windows layers setup was based on this blog post.

I wanted to get the Lulu OLEDs to show me whether the keyboard was in Mac (default layer 0) or Windows mode (default layer 3) mode. Showing the other layers was a bonus (you tend to know when you're hitting a layer key, but it's useful for debugging your keymap).

I couldn't get my head around writing text to the OLED so I hand-drew a set of OLED screens using PixilArt. These showed the Mac or Windows default layer and any additional layer (they don't make great use of the whole screen, but I'm not very artistic and they work).

I set PixilArt to use a 32 x 128 canvas, drew the white-on-black image

@damonism
damonism / qmk_dash_macros.md
Last active February 12, 2023 01:18
Em-dash and en-dash keyboard macros in QMK

En-dash (–) and em-dash (—) QMK macros

It took me ages to work out how to do macros to type an em-dash and an en-dash in Windows using the QMK keyboard firmware, so I'm going to leave it here for posterity.

Add the following code to your keymap.c file:

enum custom_keycodes {
    EM_DASH = SAFE_RANGE,
    EN_DASH,
@damonism
damonism / AEC_Boundaries.R
Created June 6, 2022 09:22
AEC division shapefiles
library(sf)
library(rappdirs)
library(usethis)
# library(lwgeom)
## Data from https://www.aec.gov.au/Electorates/gis/gis_datadownload.htm
tmp_boundaries_dir <- rappdirs::user_data_dir(appname = "ausvotesSpatial")
tmp_boundaries_df <- read.table(header = TRUE, text = "
library(xml2)
library(dplyr)
library(purrr)
xml_candidates <- read_xml("MediaFeed/aec-mediafeed-Detailed-Preload-27966-20220503123540/xml/eml-230-candidates-27966.xml")
extract_candidates <- function(nodes) {
cand_df <- data.frame()
for(n in as_list(xml_find_all(nodes, "d1:Candidate"))) {