-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathConfig.toml
76 lines (70 loc) · 3.37 KB
/
Config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[keyboard]
north_down = 1 # (1 or 0) If the magnets in your stems are north side down or south side down
# How far (in millivolts) a key needs to move down before it's considered pressed
actuation_threshold = 20 # 10-80 or so.
# How far it needs to move back up before it's considered released
release_threshold = 5 # 5-50 or so; Prevents bouncing by implementing some hysteresis
# Number of analog multiplexers on this keyboard
num_multiplexers = 5
# Maximum number of channels on each multiplexer/remote control
max_channels = 21 # Multiplexers are always 16 but my remote has 21 buttons 🤷
# USB identifiers (these are for a generic keyboard)
usb_vid = 0x16c0
usb_pid = 0x27db
# So we don't bother with disconnected pins, all mV values below this are ignored
ignore_below = 60 # Probably leave this alone; just saves a smidge of CPU time
# Don't touch keyboard stuff below this point unless you know what you're doing
recalibration_rate = 1 # How often to recalibrate all switches (seconds)
# Rotary encoder settings (TODO: Figure out how to support multiple encoders)
[encoder]
# Controls how many mV either sensor needs to go up/down before we consider that a movement
resolution = 50 # Valid values are 10-200-ish; 10 being insanely sensitive/fast and 200 being the opposite
# FYI: 35 is a good high-speed-scrolling value
# mV difference where we call it a Press()
press_threshold = 75 # Must be greater than resolution
# The analog multiplexer where the encoder lives
mux = 4
# The channels on the analog multiplexer where the encoder sensors reside
channel1 = 8
channel2 = 9
# The virtual channel (doesn't actually exist) where we define encoder Press() events
press_channel = 10
# NOTE: Make sure it's under 16 and an unused multiplexer channel on the same 'mux'
# Settings related to when we emulate a mouse (i.e. for scrolling with the rotary encoder)
[mouse]
# How many "units" (aka "lines") to scroll per press/registered rotation
scroll_amount = 2
[leds]
# How many LEDs are there? Normally there's 72 (70 keys + two under the encoder)
# but if your keyboard is controlling external LEDs you'll need to factor that into
# this number.
num_leds = 150
brightness = 40 # 0-255; for values over 30 you're going to need external power
max_brightness_unpowered = 40 # 0-255; If you want to make sure you don't go over a certain brightness
max_brightness_powered = 255 # 0-255; Maximum brightness when external 5V supply is connected
step = 5 # How much to move (±) when adjusting the LED (and Display) brightness
# speed = 15000000 # The speed at which LED effects move
speed = 50 # The speed at which LED effects move
[display]
num_matrices = 8
brightness = 1 # 0-8; FYI: MAX7129 brightness doesn't change much between lowest and highest
max_brightness = 8 # 0-8
buffer_length = 128 # Max message length
refresh_interval = 15 # FPS
vertical_flip = 1
mirror = 0
[infrared]
# Encoding method used by your remote control
encoding = 0 # 0: Nec, 1: Rc5, 2: Rc6
# Imaginary analog multiplexer that comes after all the real ones
mux = 5 # Just a location in the layers.rs where you can map buttons to actions
# TODO: Figure out a way to map remote buttons here instead of in ir_remote.rs
# These map to the portion of layers.rs that maps to IR codes
# codemap = [
# [0,76],
# [0,77],
# ]
# Developer-only stuff
[dev]
# Max speed (ms) at which we'll send (recurring) debug messages through the ST-LINK pins
debug_refresh_interval = 250