2014-12-04 04:00:25 +00:00
|
|
|
# Menelaus
|
|
|
|
|
2014-12-05 02:52:24 +00:00
|
|
|
A firmware for the
|
|
|
|
[Atreus](http://atreus.technomancy.us) keyboard, written in
|
2019-07-02 05:07:56 +00:00
|
|
|
[Microscheme](https://ryansuchocki.github.io/microscheme/).
|
2015-01-07 19:35:56 +00:00
|
|
|
|
2020-03-22 23:26:15 +00:00
|
|
|
![Atreus keyboard](atreus.jpg)
|
|
|
|
|
2020-02-23 01:28:27 +00:00
|
|
|
See [this article about how it works](https://atreus.technomancy.us/firmware).
|
|
|
|
|
2019-07-03 04:43:13 +00:00
|
|
|
## Features
|
|
|
|
|
2020-03-20 03:45:03 +00:00
|
|
|
* 6KRO (6 simultaneous keys, plus 4 modifiers)
|
2019-07-03 04:43:13 +00:00
|
|
|
* Software debouncing
|
2019-07-03 04:56:25 +00:00
|
|
|
* Multiple layers, momentary and sticky (limited only by memory)
|
2019-07-03 04:43:13 +00:00
|
|
|
* Combo keys (a single keystroke can send a modifier and a non-modifier)
|
2020-03-20 03:45:03 +00:00
|
|
|
* Bind arbitrary Microscheme functions to a key
|
2020-02-23 01:28:27 +00:00
|
|
|
* ~300 lines of code
|
2020-03-22 17:52:33 +00:00
|
|
|
* Qwerty and Dvorak layouts; easy to add more
|
2019-07-03 04:43:13 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2020-03-20 03:45:03 +00:00
|
|
|
Install [microscheme](https://github.com/ryansuchocki/microscheme/)
|
|
|
|
from source; place `microscheme` executable on your `$PATH`. Version
|
2020-03-22 17:52:33 +00:00
|
|
|
3bc5611 from March 2020 is known to work.
|
2020-03-20 03:45:03 +00:00
|
|
|
|
|
|
|
Requires [avrdude](https://www.nongnu.org/avrdude/) for uploading
|
2019-07-06 02:53:04 +00:00
|
|
|
to the controller on the keyboard; install with your package manager
|
|
|
|
of choice.
|
2019-07-03 04:56:25 +00:00
|
|
|
|
2019-07-03 04:43:13 +00:00
|
|
|
Replace `/dev/ttyACM0` with the path your OS assigns to the USB
|
2019-07-06 02:53:04 +00:00
|
|
|
bootloader of the microcontroller (on Mac OS X sometimes it is
|
|
|
|
`/dev/cu.usbmodem1411` or similar):
|
2019-07-03 04:43:13 +00:00
|
|
|
|
|
|
|
$ make upload USB=/dev/ttyACM0
|
|
|
|
|
2020-03-20 03:45:03 +00:00
|
|
|
Once you run that, put the device in bootloader mode; sometimes this
|
|
|
|
can be invoked by a key combo and sometimes a hard reset is
|
|
|
|
necessary. On the A-star Micro used in the Atreus kits, this is done
|
|
|
|
by shorting GND and RST twice in under a second, which causes the
|
|
|
|
onboard LED to pulse. The Keyboardio Atreus has a reset button you can
|
2020-03-21 02:38:34 +00:00
|
|
|
press with a pin to the bottom of the board. On linux-based systems
|
|
|
|
you can monitor for the bootloader activation using `sudo dmesg --follow`.
|
|
|
|
|
|
|
|
Some linux-based systems will need a udev rule to grant permissions to
|
|
|
|
the USB device for uploading firmware. If you get permission denied on
|
|
|
|
`/dev/ttyACM0` or whatever it is, try running `sudo make udev`.
|
2020-03-20 03:45:03 +00:00
|
|
|
|
2020-04-01 02:08:52 +00:00
|
|
|
## Limitations
|
2020-03-20 03:45:03 +00:00
|
|
|
|
2020-04-01 02:08:52 +00:00
|
|
|
If you use dual-role keys, one-shot modifiers, or mouse keys, you may
|
|
|
|
be happier with [QMK](https://docs.qmk.fm/) or
|
|
|
|
[Kaleidoscope](https://github.com/keyboardio/Kaleidoscope). Likewise
|
|
|
|
if you need more than 6 regular keys and 4 modifiers at once.
|
2020-03-20 03:45:03 +00:00
|
|
|
|
|
|
|
## Layout
|
|
|
|
|
2020-03-22 23:26:15 +00:00
|
|
|
![layout](layout.png)
|
|
|
|
|
2020-03-22 17:52:33 +00:00
|
|
|
By default you get the qwerty layout. You can copy `qwerty.scm` to
|
|
|
|
`mylayout.scm` and make changes, (you can see a list of available
|
|
|
|
keycodes in `keycodes.scm`) then upload with:
|
2019-07-07 00:18:00 +00:00
|
|
|
|
2020-03-22 23:26:15 +00:00
|
|
|
$ make upload USB=/dev/ttyACM0 LAYOUT=mylayout
|
2019-07-07 00:18:00 +00:00
|
|
|
|
2020-03-22 17:52:33 +00:00
|
|
|
There is also a `multidvorak` layout which is designed to send
|
|
|
|
the right keycodes with the assumption that the OS is set to use
|
|
|
|
Dvorak, but it also includes layers for "hard Dvorak".
|
2019-07-03 04:43:13 +00:00
|
|
|
|
2020-03-22 23:26:15 +00:00
|
|
|
The default layout is based on the Keyboardio Atreus, except that for
|
|
|
|
older 42-key builds, the percent key is replaced with backtick, and
|
|
|
|
backslash is fn+semicolon.
|
|
|
|
|
2019-07-03 04:43:13 +00:00
|
|
|
## Development
|
|
|
|
|
|
|
|
The firmware can also be run on a PC rather than on the
|
|
|
|
microcontroller in the keyboard using `test.rkt` which loads it up
|
|
|
|
into Racket and simulates the GPIO functions with a test harness:
|
|
|
|
|
|
|
|
$ make test
|
2019-07-06 02:53:04 +00:00
|
|
|
racket test.rkt
|
|
|
|
..........................
|
2019-07-03 04:43:13 +00:00
|
|
|
|
2014-12-04 04:00:25 +00:00
|
|
|
## License
|
|
|
|
|
2020-02-21 16:00:13 +00:00
|
|
|
Copyright © 2014-2020 Phil Hagelberg and contributors
|
2014-12-04 04:00:25 +00:00
|
|
|
|
2020-03-21 02:38:34 +00:00
|
|
|
Released under the [GNU GPL version 3](https://www.gnu.org/licenses/gpl.html)
|
|
|
|
or any later version.
|
2019-07-03 04:56:25 +00:00
|
|
|
|
|
|
|
Uses [PJRC USB Keyboard library](http://www.pjrc.com/teensy/usb_keyboard.html)
|
|
|
|
which is Copyright © 2009 PJRC.COM, LLC and released under the MIT/X11 license.
|