diff options
80 files changed, 28105 insertions, 4409 deletions
diff --git a/.gitignore b/.gitignore index bae2658b00..49eb2d5587 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ tags *~ build/ *.bak +.vagrant/ diff --git a/QUICK_START.md b/QUICK_START.md new file mode 100644 index 0000000000..6be377db3c --- /dev/null +++ b/QUICK_START.md @@ -0,0 +1,25 @@ +# Quick Start Directions + +This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter. + +## Requirements + +Using the Vagrantfile in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion). + +*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. + +Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. + +Build Firmware and Program Controller +------------------------------------- +See [doc/build.md](tmk_core/doc/build.md), or the README in the particular keyboard/* folder. + +Change your keymap +------------------ +See [doc/keymap.md](tmk_core/doc/keymap.md). + +## Flashing the firmware + +The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](keyboard/ergodox_ez/README.md) gives a great example. + +If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. @@ -13,6 +13,7 @@ The documentation below explains QMK customizations and elaborates on some of th ## Getting started * **If you're looking to customize a keyboard that currently runs QMK or TMK** , find your keyboard's directory under `/keyboard/` and read the README file. This will get you all set up. +* Read the [QUICK_START.md](QUICK_START.md) if you want to hit the ground running with minimal fuss or you aren't a technical person and you just want to build the firmware with the least amount of hassle possible. * If you're looking to apply this firmware to an entirely new hardware project (a new kind of keyboard), you can create your own Quantum-based project by using `./new_project.sh <project_name>`, which will create `/keyboard/<project_name>` with all the necessary components for a Quantum project. You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you. @@ -46,6 +47,7 @@ Your keymap can include shortcuts to common operations (called "function actions * `RGUI(kc)` - applies right GUI (command/win) to *kc* * `HYPR(kc)` - applies Hyper (all modifiers) to *kc* * `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc* +* `LCAG(kc)` - applies CtrlAltGui to *kc* You can also chain these, like this: @@ -89,6 +91,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac * `ALT_T(kc)` - is LALT when held and *kc* when tapped * `GUI_T(kc)` - is LGUI when held and *kc* when tapped * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) + * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. ### Temporarily setting the default layer @@ -175,3 +178,23 @@ This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happeni ## Bluetooth functionality This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. + +## International Characters on Windows + +[AutoHotkey](https://autohotkey.com) allows Windows users to create custom hotkeys amont others. + +The method does not require Unicode support in the keyboard itself but depends instead of AutoHotkey running in the background. + +First you need to select a modifier combination that is not in use by any of your programs. +CtrlAltWin is not used very widely and should therefore be perfect for this. +There is a macro defined for a mod-tab combo `LCAG_T`. +Add this mod-tab combo to a key on your keyboard, e.g.: `LCAG_T(KC_TAB)`. +This makes the key behave like a tab key if pressed and released immediately but changes it to the modifier if used with another key. + +In the default script of AutoHotkey you can define custom hotkeys. + + <^<!<#a::Send, ä + <^<!<#<+a::Send, Ä + +The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a. +AutoHotkey inserts the Text right of `Send, ` when this combination is pressed. diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000000..1abe8ff3b1 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,88 @@ +# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure(2) do |config|
+ # You can only have one config.vm.box uncommented at a time
+
+ # Comment this and uncomment another if you don't want to use the minimal Arch box
+ config.vm.box = "dragon788/arch-ala-elasticdog"
+
+ # VMware/Virtualbox 64 bit
+ # config.vm.box = "phusion/ubuntu-14.04-amd64"
+ #
+ # VMware/Virtualbox 64 bit
+ #config.vm.box = "puphpet/centos65-x64"
+ #
+ # The opensuse boxes don't have dfu-util in their default repositories
+ #
+ # The virtualbox version has tools issues
+ # VMware/Virtualbox 64 bit
+ #config.vm.box = "bento/opensuse-13.2-x86_64"
+ #
+ # Virtualbox only
+ #config.vm.box = "bento/opensuse-13.2-i386"
+ # config.vm.box = ""
+ # config.vm.box = ""
+
+ # This section allows you to customize the Virtualbox VM
+ # settings, ie showing the GUI or upping the memory
+ # or cores if desired
+ config.vm.provider "virtualbox" do |vb|
+ # Hide the VirtualBox GUI when booting the machine
+ vb.gui = false
+ # Uncomment the below lines if you want to program
+ # your Teensy via the VM rather than your host OS
+ #vb.customize ['modifyvm', :id, '--usb', 'on']
+ #vb.customize ['usbfilter', 'add', '0',
+ # '--target', :id,
+ # '--name', 'teensy',
+ # '--vendorid', '0x16c0',
+ # '--productid','0x0478'
+ # ]
+ # Customize the amount of memory on the VM:
+ vb.memory = "512"
+ end
+
+ # This section allows you to customize the VMware VM
+ # settings, ie showing the GUI or upping the memory
+ # or cores if desired
+ config.vm.provider "vmware_workstation" do |vmw|
+ # Hide the VMware GUI when booting the machine
+ vmw.gui = false
+
+ # Customize the amount of memory on the VM:
+ vmw.memory = "512"
+ end
+
+ config.vm.provider "vmware_fusion" do |vmf|
+ # Hide the vmfare GUI when booting the machine
+ vmf.gui = false
+
+ # Customize the amount of memory on the VM:
+ vmf.memory = "512"
+ end
+
+ # This script ensures the required packages for AVR programming are installed
+ # It also ensures the system always gets the latest updates when powered on
+ # If this causes issues you can run a 'vagrant destroy' and then
+ # add a # before ,args: and run 'vagrant up' to get a working
+ # non-updated box and then attempt to troubleshoot or open a Github issue
+
+ config.vm.provision "shell", run: "always", path: "avr_setup.sh", args: "-update"
+
+ config.vm.post_up_message = """
+ Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)
+ or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool
+
+ Change directory (cd) to the keyboard you wish to program
+ (Optionally) modify your layout,
+ then run 'make clean'
+ and then 'make' to compile the .eep and .hex files.
+
+ Or you can copy and paste the example line below.
+
+ cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make
+
+
+ """
+end
diff --git a/avr_setup.sh b/avr_setup.sh new file mode 100644 index 0000000000..34a8a3281b --- /dev/null +++ b/avr_setup.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# This script will attempt to setup the Linux dependencies for compiling QMK/TMK + +# This could probably go much lower, but since we are including an Arch vagrant, +# making it the first match makes sense + +if [[ -n "$(type -P pacman )" ]]; then + # Arch linux and derivatives like Apricity + # Future improvements: + # Allow user to speed up package installs using powerpill/wget tweaks + # Always run the pacman mirror update script if possible when vagrant comes up + # This will ensure that users never get stalled on a horribly slow mirror + pacman -Syyu --needed --noconfirm + pacman -S --needed --noconfirm \ + base-devel \ + avr-gcc \ + avr-binutils \ + avr-libc \ + dfu-util + +elif [[ -n "$(type -P apt-get)" ]]; then + # Debian and derivatives + # This block performs completely non-interactive updates {{ + export DEBIAN_FRONTEND=noninteractive + export DEBCONF_NONINTERACTIVE_SEEN=true + echo "grub-pc hold" | dpkg --set-selections + apt-get -y update + apt-get -y --allow-unauthenticated upgrade \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" + # }} + apt-get install -y \ + build-essential \ + gcc \ + unzip \ + wget \ + zip \ + gcc-avr \ + binutils-avr \ + avr-libc \ + dfu-util + +elif [[ -n "$(type -P yum)" ]]; then + # Fedora, CentOS or RHEL and derivatives + yum -y makecache && yum -y update + yum -y install \ + gcc \ + glibc-headers \ + kernel-devel \ + kernel-headers \ + make \ + perl \ + git \ + wget \ + avr-binutils \ + avr-gcc \ + avr-libc \ + dfu-util + +elif [[ -n "$(type -P zypper)" ]]; then + # openSUSE + zypper --non-interactive refresh && zypper --non-interactive update + zypper --non-interactive install \ + git \ + make \ + gcc \ + kernel-devel \ + patch \ + wget \ + dfu-programmer + +fi diff --git a/keyboard/ergodox_ez/Makefile b/keyboard/ergodox_ez/Makefile index 3b70258402..8066c7bb4b 100644 --- a/keyboard/ergodox_ez/Makefile +++ b/keyboard/ergodox_ez/Makefile @@ -31,15 +31,14 @@ SRC = ergodox_ez.c \ matrix.c ifdef KEYMAP - SRC := keymaps/keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP)/keymap.c $(SRC) else - SRC := keymaps/keymap_default.c $(SRC) + SRC := keymaps/default/keymap.c $(SRC) endif CONFIG_H = config.h # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -94,13 +93,13 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # MIDI_ENABLE = yes # MIDI controls -# uNICODE_ENABLE = yes # Unicode +# UNICODE_ENABLE = yes # Unicode # Optimize size but this may cause error "relocation truncated to fit" diff --git a/keyboard/ergodox_ez/config.h b/keyboard/ergodox_ez/config.h index 825997ba05..6a391ffb54 100644 --- a/keyboard/ergodox_ez/config.h +++ b/keyboard/ergodox_ez/config.h @@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOUSEKEY_MAX_SPEED 3 #define MOUSEKEY_TIME_TO_MAX 10 +#define TAPPING_TOGGLE 1 + #define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define ROWS (int []){ D0, D5, B5, B6 } diff --git a/keyboard/ergodox_ez/keymaps/keymap_andrew_osx.hex b/keyboard/ergodox_ez/keymaps/andrew_osx/andrew_osx.hex index e3ee9afd3e..e3ee9afd3e 100644 --- a/keyboard/ergodox_ez/keymaps/keymap_andrew_osx.hex +++ b/keyboard/ergodox_ez/keymaps/andrew_osx/andrew_osx.hex diff --git a/keyboard/ergodox_ez/keymaps/keymap_andrew_osx.c b/keyboard/ergodox_ez/keymaps/andrew_osx/keymap.c index 48f8c5d2ff..48f8c5d2ff 100644 --- a/keyboard/ergodox_ez/keymaps/keymap_andrew_osx.c +++ b/keyboard/ergodox_ez/keymaps/andrew_osx/keymap.c diff --git a/keyboard/ergodox_ez/keymaps/coderkun_neo2/coderkun_neo2.hex b/keyboard/ergodox_ez/keymaps/coderkun_neo2/coderkun_neo2.hex new file mode 100644 index 0000000000..c4804d4830 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/coderkun_neo2/coderkun_neo2.hex @@ -0,0 +1,1461 @@ +:100000000C94AF060C94F3060C94F3060C94F306D0
+:100010000C94F3060C94F3060C94F3060C94F3067C
+:100020000C94F3060C94F3060C9406120C94D8125C
+:100030000C94F3060C94F3060C94F3060C94F3065C
+:100040000C94F3060C94B02B0C94F3060C94F3066A
+:100050000C94F3060C94B7210C94F3060C94F3065D
+:100060000C94F3060C94F3060C94F3060C94F3062C
+:100070000C94F3060C94F3060C94F3060C94F3061C
+:100080000C94F3060C94F3060C94F3060C94F3060C
+:100090000C94F3060C94F3060C94F3060C94F306FC
+:1000A0000C94F3060C94F3060C94F3063D135F13C3
+:1000B0004A145F134A14A113C4134A1419142C14BC
+:1000C0007A177A17A817A817EB172718281A281ACB
+:1000D0003F18281A36193619021A281A281A161A19
+:1000E0000000F0A12B0034003900E100E000000026
+:1000F0001E00140004001D00E200007F1F001A0013
+:1001000016001B000152280020000800070006000E
+:10011000E3002C00210015000900190064002D00E7
+:10012000220017000A000500000050002E004A00BF
+:1001300000000100000052002E004D0000000100F0
+:100140000000510023001C000B00110000004F00B4
+:10015000240018000D001000E6002D0025000C0002
+:100160000E003600E7002C00260012000F003700BA
+:10017000015228002700130033003800E600007702
+:100180002A002F003100E500E4000000010001001A
+:100190000100010001000000010001000100010058
+:1001A0000100010001000100010001000100010047
+:1001B000010001000100010001000100010013A77E
+:1001C00015A701000100F400010001000100010079
+:1001D0000000F20001000100000001000000F0003A
+:1001E00001000100000001000000F1000100010019
+:1001F000010001000000F300010042003E003A004F
+:100200000100F500010043003F003B000100010038
+:100210000100440040003C000100010001004500D5
+:1002200041003D000100010001000100010001004A
+:10023000010000000A002530313662003A20002516
+:10024000303258000A722F63203031323334353661
+:100250003738 |