Add custom keymap and font for Smathev layout on Fingerpunch Sweeeeep keyboard

- Implemented glcdfont.c for custom font rendering.
- Created keymap.c with multiple layers including NORTO, QWERTY, NORTNAVIGATION, and SYMFKEYS.
- Added OLED display functionality to show layer states and modifier statuses.
- Included keymap.json for configuration.
This commit is contained in:
Smathev 2025-10-07 10:24:52 +02:00
parent e6501772fe
commit 379e203b38
7 changed files with 9 additions and 26 deletions

View file

@ -0,0 +1,271 @@
# Sweeeeep Keyboard Layout - smathev
## Overview
This is a 36-key split keyboard layout using the Norto layout (Danish optimized) with 4 layers.
---
## Layer 0: NORTO (Base Layer)
**Default typing layer - Danish optimized layout**
```
┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
│ Ø │ Æ │ U │ G │ J │ │ B │ F │ L │ H │ X │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│ O │ I │ A │ T │ M │ │ P │ N │ R │ S │ D │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│GUI ,│ALT Y│SFT Å│CTL V│ C │ │ W │CTL K│SFT Z│ALT Q│GUI .│
└─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
┌─────┬─────┬─────┐ ┌─────┬─────┬─────┐
│ NAV │ - │ E │ │SPC │BSPC │ SYM │
│ LT │ │ │ │ │ │ LT │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
```
**Key Features:**
- **Home row mods**: GUI, ALT, SHIFT, CTRL on bottom row (left and right)
- **Layer access**: Left thumb activates Navigation layer, Right thumb activates Symbol/FKey layer
- **Optimized for Danish**: Ø, Æ, Å in easy reach
---
## Layer 1: QWERTY
**Alternative QWERTY layout for compatibility**
```
┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ Å │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│GUI Z│ALT X│SFT C│CTL V│ B │ │ N │CTL M│SFT Æ│ALT Ø│GUI -│
└─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
┌─────┬─────┬─────┐ ┌─────┬─────┬─────┐
│ NAV │ , │BSPC │ │SPC │ . │ ENT │
│ LT │ │ │ │ │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
```
**Toggling Layers:**
- Access from Navigation or Symbol layer toggle keys
---
## Layer 2: NORTNAVIGATION (Navigation + Numpad)
**Activated by holding left thumb key**
```
┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
│ ESC │PGUP │ ↑ │PGDN │STAB │ │ * │ 7 │ 8 │ 9 │ + │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│HOME │ ← │ ↓ │ → │ END │ │ / │ 4 │ 5 │ 6 │ - │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│ GUI │ ALT │SHFT │CTRL │ │ │ ( │CTL 1│SFT 2│ALT 3│GUI 0│
└─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
┌─────┬─────┬─────┐ ┌─────┬─────┬─────┐
│ │NORTO│QWRT │ │QWRT │NORTO│ │
│ │ TG │ TG │ │ TG │ TG │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
```
**Key Features:**
- **Left side**: Full navigation cluster (arrows, home, end, page up/down)
- **Right side**: Complete numpad with operators
- **Super Tab** (STAB): Special tab switching macro
- **Layer toggles**: Quick access to switch between NORTO and QWERTY base layers
- **Home row mods**: Maintained on left side for modifier combinations
---
## Layer 3: SYMFKEYS (Symbols + Function Keys)
**Activated by holding right thumb key**
```
┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐
│ F1 │ F2 │ F3 │ F4 │ F5 │ │ @ │ [ │ { │ ^ │ │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│ F6 │ F7 │ F8 │ F9 │ F10 │ │ ' │ < │ $ │ | │ ` │
├─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┤
│GUI │ALT │SHFT │CTRL │ B │ │ │CAPS │ ___ │ - │ GUI │
│ F11 │ F12 │ C │ V │ │ │ │WORD │CASE │CASE │ │
└─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘
┌─────┬─────┬─────┐ ┌─────┬─────┬─────┐
│ │NORTO│QWRT │ │QWRT │NORTO│ │
│ │ TG │ TG │ │ TG │ TG │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
```
**Key Features:**
- **Left side**: Complete F-key row (F1-F12) with home row mods on F11/F12
- **Right top row**: Common programming symbols (@, [, {, ^)
- **Right middle row**: Quote/bracket symbols (', <, $, |, `)
- **Right bottom row**: **CASEMODES KEYS!**
- **CAPSWORD**: Tap to enable caps word mode (hold with Ctrl for tap)
- **___CASE** (underscore): Tap to enable snake_case mode (hold with Shift for tap)
- **-CASE** (hyphen): Tap to enable kebab-case mode (hold with Alt for tap)
**Symbol Notes:**
- Danish keyboard layout symbols:
- `DK_AT` (@)
- `DK_LBRC` ([) - Shift for ]
- `DK_LCBR` ({) - Shift for }
- `DK_QUOT` (') - Shift for "
- `DK_LABK` (<) - Shift for >
- `DK_DLR` ($) - Shift for €
- `DK_PIPE` (|)
- `DK_GRV` (`) - Shift for ¨
- `DK_CIRC` (^)
---
## Special Features
### Home Row Mods
All layers maintain home row mods for ergonomic modifier access:
- **Left**: GUI (pinky) → ALT (ring) → SHIFT (middle) → CTRL (index)
- **Right**: CTRL (index) → SHIFT (middle) → ALT (ring) → GUI (pinky)
### Tap/Hold Keys
- **Bottom row keys**: Tap for letter, hold for modifier
- **Thumb keys**: Tap for key, hold for layer
- **Symbol layer bottom row**: Tap for casemode, hold for modifier
### Casemodes (Layer 3, Right Bottom Row)
#### C_CAPSWORD
**Location**: Right bottom row, 2nd key (with Ctrl hold)
**Usage:**
1. Hold right thumb (activate Symbol layer)
2. Tap the CAPSWORD key
3. Release thumb
4. Start typing: `hello world``HELLO WORLD`
5. Press space twice to exit
**What it does:**
- Automatically capitalizes all letters
- Continues until you press space twice or punctuation
- Perfect for typing `CONSTANT_NAMES` or `ALL_CAPS_TEXT`
#### C_UNDERSCORECASE (Snake Case)
**Location**: Right bottom row, 3rd key (with Shift hold)
**Usage:**
1. Hold right thumb (activate Symbol layer)
2. Tap the ___CASE key
3. Release thumb
4. Type: `hello world``hello_world`
5. Press space to insert underscores
6. Press space twice to exit
**What it does:**
- Converts spaces to underscores
- Perfect for `variable_names`, `function_names`, `file_names`
#### C_HYPHENCASE (Kebab Case)
**Location**: Right bottom row, 4th key (with Alt hold)
**Usage:**
1. Hold right thumb (activate Symbol layer)
2. Tap the -CASE key
3. Release thumb
4. Type: `hello world``hello-world`
5. Press space to insert hyphens
6. Press space twice to exit
**What it does:**
- Converts spaces to hyphens
- Perfect for `css-class-names`, `url-slugs`, `command-line-options`
### Auto Shift
- Enabled with 170ms timeout
- Hold any letter key slightly longer to get the shifted version
- No need to use Shift for capital letters when typing slowly
### Combos
- 17 combos defined (see combos.c for specific combinations)
- Combo reference layer: NORTO
### OLED Display Features
- **Master side**: Shows logo, current layer, modifier status, WPM
- **Secondary side**: Shows logo with WPM counter
- **Auto sleep**: Screen turns off after 15 seconds of inactivity
- **Auto wake**: Screen turns on when you start typing
---
## Layer Toggle Matrix
| From Layer | To Layer | Method |
|------------|----------|--------|
| Any | NORTO | Hold Nav or Sym layer, tap NORTO toggle |
| Any | QWERTY | Hold Nav or Sym layer, tap QWERTY toggle |
| NORTO/QWERTY | Navigation | Hold left thumb |
| NORTO/QWERTY | Symbol/FKeys | Hold right thumb |
---
## Firmware Configuration
### Enabled Features
- ✅ OLED Display (128x32)
- ✅ Split keyboard support
- ✅ Combos (17 defined)
- ✅ Auto Shift (170ms)
- ✅ Casemodes
- ✅ WPM tracking (split)
- ✅ Modifier state tracking (split)
- ✅ Layer state tracking (split)
- ✅ Deferred execution
- ✅ Permissive hold
- ✅ Retro shift
- ✅ Retro tapping
### Timing Settings
- **Tapping term**: 140ms
- **Auto shift timeout**: 170ms
- **OLED timeout**: 15 seconds
### Custom Features
- Custom OLED font (glcdfont.c)
- Master/slave split configuration
- Super Tab macro (FP_SUPER_TAB)
---
## Tips for New Users
1. **Start with NORTO layer**: It's optimized for Danish typing
2. **Learn home row mods**: Keep fingers on home row, use pinky/ring for GUI/ALT
3. **Use casemodes**: They're incredibly useful for coding and writing
4. **Practice layer switching**: Get comfortable with thumb-activated layers
5. **Double-tap space**: Quick way to exit any casemode
6. **OLED feedback**: Watch the OLED to see which modifiers/layers are active
---
## Quick Reference Card
```
┌───────────────────────────────────────────────────┐
│ Most Used Key Combinations │
├───────────────────────────────────────────────────┤
│ Left Thumb Hold → Navigation + Numpad │
│ Right Thumb Hold → Symbols + Function Keys │
│ Both Thumbs → Access layer toggles │
│ │
│ Casemodes (Right thumb + right bottom row): │
│ Thumb + 2nd key → CAPS WORD │
│ Thumb + 3rd key → snake_case │
│ Thumb + 4th key → kebab-case │
│ │
│ Exit any casemode: Press SPACE twice │
└───────────────────────────────────────────────────┘
```
---
**Generated**: October 6, 2025
**Keyboard**: Fingerpunch Sweeeeep
**Layout**: Custom NORTO (Danish optimized)
**Keymap**: smathev

View file

@ -0,0 +1,232 @@
#include "progmem.h"
// Corne 8x6 font with QMK Firmware Logo
// Online editor: https://helixfonteditor.netlify.com/
// See also: https://github.com/soundmonster/glcdfont_converter
const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x00, 0xE0, 0x78,
0x7C, 0x7E, 0x7E, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x7E, 0x7E, 0x7C, 0x78,
0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2,
0x42, 0x42, 0x42, 0xE2, 0x52, 0x22,
0x22, 0x22, 0x42, 0x82, 0x02, 0x02,
0x22, 0x22, 0x02, 0x04, 0xF8, 0x00,
0x00, 0xF8, 0x04, 0x02, 0x02, 0x82,
0x42, 0x22, 0x42, 0x82, 0x02, 0x02,
0x02, 0x82, 0x42, 0x22, 0x12, 0x22,
0x42, 0x82, 0x02, 0x04, 0xF8, 0x00,
0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E,
0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE,
0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE,
0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00,
0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E,
0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x40, 0x40, 0x20, 0x20,
0x10, 0x10, 0x08, 0x08, 0x10, 0x10,
0x20, 0x20, 0x40, 0x40, 0x80, 0x80,
0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0,
0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0,
0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80,
0x80, 0x80, 0x40, 0x40, 0x20, 0x20,
0x10, 0x10, 0x08, 0x08, 0x10, 0x10,
0x20, 0x20, 0x40, 0x40, 0x80, 0x80,
0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0,
0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0,
0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80,
0x00, 0x00, 0xC0, 0x67, 0xBF, 0x67,
0xCC, 0xF8, 0xF8, 0xFC, 0xFC, 0xFC,
0x7E, 0x7E, 0x3F, 0x7E, 0x7E, 0xFC,
0xFC, 0xFC, 0xF8, 0xF8, 0xCC, 0x67,
0xBF, 0x67, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47,
0x42, 0x42, 0x42, 0x47, 0x4A, 0x44,
0x40, 0x40, 0x40, 0x40, 0x41, 0x42,
0x44, 0x44, 0x40, 0x20, 0x1F, 0x00,
0x00, 0x1F, 0x20, 0x40, 0x41, 0x40,
0x40, 0x40, 0x40, 0x40, 0x41, 0x40,
0x41, 0x41, 0x4F, 0x48, 0x48, 0x48,
0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00,
0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78,
0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B,
0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D,
0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00,
0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F,
0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E,
0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C,
0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88,
0x88, 0x88, 0x55, 0x55, 0x23, 0x23,
0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47,
0x23, 0x23, 0x55, 0x55, 0x88, 0x88,
0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2,
0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4,
0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88,
0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6,
0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6,
0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88,
0x00, 0x00, 0x03, 0x0F, 0x1E, 0x3D,
0x7A, 0x9F, 0xAB, 0x89, 0x9D, 0x7C,
0x5E, 0x8E, 0xF7, 0x8E, 0x5E, 0x7C,
0x9D, 0x89, 0xAB, 0x9F, 0x7A, 0x3D,
0x1E, 0x0F, 0x03, 0x00, 0x00, 0x00,
0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04,
0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20,
0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04,
0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20,
0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC,
0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F,
0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC,
0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F,
0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE,
0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00,
0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77,
0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
0x04, 0x04, 0x08, 0x08, 0x04, 0x04,
0x02, 0x02, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
0x04, 0x04, 0x08, 0x08, 0x04, 0x04,
0x02, 0x02, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x03, 0x03,
0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07,
0x03, 0x03, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x03, 0x02,
0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06,
0x03, 0x02, 0x01, 0x01, 0x00, 0x00,
};

View file

@ -0,0 +1,313 @@
/* Copyright 2021 Sadek Baroudi
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "smathev.h"
#include <stdio.h>
#include "wrappers.h"
#include "casemodes.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
char wpm_str[6];
// clang-format off
#define LAYOUT_sweeeeep_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
K33, K34, K35, K36, K37, K38 \
) \
LAYOUT_wrapper( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
LT(_NORTNAVIGATION, K33), K34, K35, K36, K37, LT(_SYMFKEYS, K38) \
)
/* Re-pass though to allow templates to be used */
#define LAYOUT_sweeeeep_base_wrapper(...) LAYOUT_sweeeeep_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NORTO] = LAYOUT_sweeeeep_base_wrapper(
__________________NORTO_L1____________________, __________________NORTO_R1____________________,
__________________NORTO_L2____________________, __________________NORTO_R2____________________,
__________________NORTO_L3____________________, __________________NORTO_R3____________________,
__NORTO_THUMBS_6__
),
[_QWERTY] = LAYOUT_sweeeeep_base_wrapper(
__________________QWERTY_L1____________________, __________________QWERTY_R1____________________,
__________________QWERTY_L2____________________, __________________QWERTY_R2____________________,
__________________QWERTY_L3____________________, __________________QWERTY_R3____________________,
__QWERTY_THUMBS_6__
),
[_NORTNAVIGATION] = LAYOUT_sweeeeep_base_wrapper(
____________NORTNAVIGATION_1_______________, _________________NUMPAD_1__________________,
____________NORTNAVIGATION_2_______________, _________________NUMPAD_2__________________,
____________NORTNAVIGATION_3_______________, _________________NUMPAD_3__________________,
_______, TG(_NORTO), TG(_QWERTY), TG(_QWERTY), TG(_NORTO), _______
),
[_SYMFKEYS] = LAYOUT_sweeeeep_base_wrapper(
___________________FKEY______L1________________, ________________NORTSYMBOLS_R1_________________,
___________________FKEY______L2________________, ________________NORTSYMBOLS_R2_________________,
___________________FKEY______L3________________, ________________NORTSYMBOLS_R3_________________,
_______, TG(_NORTO), TG(_QWERTY), TG(_QWERTY), TG(_NORTO), _______
)
};
#ifdef OLED_ENABLE
// static uint32_t oled_timer = 0;
bool process_record_oled(uint16_t keycode, keyrecord_t *record);
oled_rotation_t oled_init_user(oled_rotation_t rotation);
void render_layer_symbol(void);
void render_layer_name(void);
void render_mod_state(uint8_t modifiers);
void render_status(void);
bool oled_task_user(void);
#endif
#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
void render_space(void) {
oled_write_P(PSTR(" "), false);
}
void render_mod_status_gui_alt(uint8_t modifiers) {
static const char PROGMEM gui_off_1[] = {0x85, 0x86, 0};
static const char PROGMEM gui_off_2[] = {0xa5, 0xa6, 0};
static const char PROGMEM gui_on_1[] = {0x8d, 0x8e, 0};
static const char PROGMEM gui_on_2[] = {0xad, 0xae, 0};
static const char PROGMEM alt_off_1[] = {0x87, 0x88, 0};
static const char PROGMEM alt_off_2[] = {0xa7, 0xa8, 0};
static const char PROGMEM alt_on_1[] = {0x8f, 0x90, 0};
static const char PROGMEM alt_on_2[] = {0xaf, 0xb0, 0};
// fillers between the modifier icons bleed into the icon frames
static const char PROGMEM off_off_1[] = {0xc5, 0};
static const char PROGMEM off_off_2[] = {0xc6, 0};
static const char PROGMEM on_off_1[] = {0xc7, 0};
static const char PROGMEM on_off_2[] = {0xc8, 0};
static const char PROGMEM off_on_1[] = {0xc9, 0};
static const char PROGMEM off_on_2[] = {0xca, 0};
static const char PROGMEM on_on_1[] = {0xcb, 0};
static const char PROGMEM on_on_2[] = {0xcc, 0};
if(modifiers & MOD_MASK_GUI) {
oled_write_P(gui_on_1, false);
} else {
oled_write_P(gui_off_1, false);
}
if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) {
oled_write_P(on_on_1, false);
} else if(modifiers & MOD_MASK_GUI) {
oled_write_P(on_off_1, false);
} else if(modifiers & MOD_MASK_ALT) {
oled_write_P(off_on_1, false);
} else {
oled_write_P(off_off_1, false);
}
if(modifiers & MOD_MASK_ALT) {
oled_write_P(alt_on_1, false);
} else {
oled_write_P(alt_off_1, false);
}
if(modifiers & MOD_MASK_GUI) {
oled_write_P(gui_on_2, false);
} else {
oled_write_P(gui_off_2, false);
}
if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) {
oled_write_P(on_on_2, false);
} else if(modifiers & MOD_MASK_GUI) {
oled_write_P(on_off_2, false);
} else if(modifiers & MOD_MASK_ALT) {
oled_write_P(off_on_2, false);
} else {
oled_write_P(off_off_2, false);
}
if(modifiers & MOD_MASK_ALT) {
oled_write_P(alt_on_2, false);
} else {
oled_write_P(alt_off_2, false);
}
}
void render_mod_status_ctrl_shift(uint8_t modifiers) {
static const char PROGMEM ctrl_off_1[] = {0x89, 0x8a, 0};
static const char PROGMEM ctrl_off_2[] = {0xa9, 0xaa, 0};
static const char PROGMEM ctrl_on_1[] = {0x91, 0x92, 0};
static const char PROGMEM ctrl_on_2[] = {0xb1, 0xb2, 0};
static const char PROGMEM shift_off_1[] = {0x8b, 0x8c, 0};
static const char PROGMEM shift_off_2[] = {0xab, 0xac, 0};
static const char PROGMEM shift_on_1[] = {0xcd, 0xce, 0};
static const char PROGMEM shift_on_2[] = {0xcf, 0xd0, 0};
// fillers between the modifier icons bleed into the icon frames
static const char PROGMEM off_off_1[] = {0xc5, 0};
static const char PROGMEM off_off_2[] = {0xc6, 0};
static const char PROGMEM on_off_1[] = {0xc7, 0};
static const char PROGMEM on_off_2[] = {0xc8, 0};
static const char PROGMEM off_on_1[] = {0xc9, 0};
static const char PROGMEM off_on_2[] = {0xca, 0};
static const char PROGMEM on_on_1[] = {0xcb, 0};
static const char PROGMEM on_on_2[] = {0xcc, 0};
if(modifiers & MOD_MASK_CTRL) {
oled_write_P(ctrl_on_1, false);
} else {
oled_write_P(ctrl_off_1, false);
}
if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) {
oled_write_P(on_on_1, false);
} else if(modifiers & MOD_MASK_CTRL) {
oled_write_P(on_off_1, false);
} else if(modifiers & MOD_MASK_SHIFT) {
oled_write_P(off_on_1, false);
} else {
oled_write_P(off_off_1, false);
}
if(modifiers & MOD_MASK_SHIFT) {
oled_write_P(shift_on_1, false);
} else {
oled_write_P(shift_off_1, false);
}
if(modifiers & MOD_MASK_CTRL) {
oled_write_P(ctrl_on_2, false);
} else {
oled_write_P(ctrl_off_2, false);
}
if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) {
oled_write_P(on_on_2, false);
} else if(modifiers & MOD_MASK_CTRL) {
oled_write_P(on_off_2, false);
} else if(modifiers & MOD_MASK_SHIFT) {
oled_write_P(off_on_2, false);
} else {
oled_write_P(off_off_2, false);
}
if(modifiers & MOD_MASK_SHIFT) {
oled_write_P(shift_on_2, false);
} else {
oled_write_P(shift_off_2, false);
}
}
void render_logo(void) {
static const char PROGMEM corne_logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4,
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0};
oled_write_P(corne_logo, false);
oled_write_P(PSTR("Gio*K"), false);
}
void render_logo2(void) {
static const char PROGMEM corne_logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4,
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0};
oled_write_P(corne_logo, false);
sprintf(wpm_str,">>%03d", get_current_wpm());
oled_write(wpm_str,false);
}
void render_layer_state(void) {
static const char PROGMEM default_layer[] = {
0x20, 0x94, 0x95, 0x96, 0x20,
0x20, 0xb4, 0xb5, 0xb6, 0x20,
0x20, 0xd4, 0xd5, 0xd6, 0x20, 0};
static const char PROGMEM raise_layer[] = {
0x20, 0x97, 0x98, 0x99, 0x20,
0x20, 0xb7, 0xb8, 0xb9, 0x20,
0x20, 0xd7, 0xd8, 0xd9, 0x20, 0};
static const char PROGMEM lower_layer[] = {
0x20, 0x9a, 0x9b, 0x9c, 0x20,
0x20, 0xba, 0xbb, 0xbc, 0x20,
0x20, 0xda, 0xdb, 0xdc, 0x20, 0};
if(layer_state_is(_SYMBOLS)) {
oled_write_P(lower_layer, false);
} else if(layer_state_is(_NAVIGATION)) {
oled_write_P(raise_layer, false);
} else {
oled_write_P(default_layer, false);
}
}
void render_status_main(void) {
render_logo();
render_space();
render_layer_state();
render_space();
render_mod_status_gui_alt(get_mods()|get_oneshot_mods());
render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods());
}
void render_status_secondary(void) {
render_logo2();
render_space();
render_layer_state();
render_space();
render_mod_status_gui_alt(get_mods()|get_oneshot_mods());
render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods());
}
static bool oled_active = true;
bool process_record_user_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool oled_task_user(void) {
if (last_input_activity_elapsed() > 15000) {
if (oled_active) { // Only turn off if it's currently on
oled_off();
oled_active = false;
}
return false; // Don't render while sleeping
}
// If we get here, there's been recent activity
if (!oled_active) {
oled_on();
oled_active = true;
}
if (is_keyboard_master()) {
render_status_main();
} else {
render_status_secondary();
}
return false;
}
#endif

View file

@ -0,0 +1,3 @@
{
"converter": "liatris"
}