jazn / adnw

AVR keyboard firmware with PS/2 trackpoint support & macro mode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This is a firmware for AVR microcontrollers with USB device support like the Teensy to simulate a keyboard and a mouse. It was created for a custom split keyboard design with 4x6 keys on each side in a matrix layout but could be adapted easily for other hardware.

By default, it implements a different, more ergonomic layout without any further drivers on any host operating system. In its current state, the well evolved AdNW layout is implemented with modified layers 3&4 (special characters, navigational keys and numpad) from the neo layout. In addition, an integrated IBM trackpoint is also supported, but any PS/2 compatible device can also be hooked-up to the controller.

BlueCube HyperNano

This is my daily driver since about 2 years now: RedTilt

A presentation of my current keyboard prototype can be found here, where you'll also find more detailed information on the hardware and the layout used as well as discussions related to these project.

Features

  • Full macro support with all configuration done on the keyboard itself, no external tools needed.
  • 2nd-Use modifier keys acting as normal keys when toggled by themselves.
  • PS/2 protocol for pointing devices
  • Mouse device with 3 buttons and 2 scrollwheels
  • IBM trackpoint configuration
  • Supports multiple layouts in switchable layers
  • Native support for different host keyboard language settings, qwertz and qwerty implemented
  • HMAC-SHA1 based string generatiom for safer passwords

Credits

The driver was originally based on humblehackers hhkb firmware, but I found some things (while pretty neat and cleanly implemented) a little too difficult to adjust, so I revamped everything but the most basic USB code.

Implementation of mousekey layer, KEYMAP macro and other neat ideas borrowed from the very advanced tmk_firmware.

Klaus Weber contributed greatly to an enhanced secondary use state machine and provided several other modifications, including alternate layouts as well as PC/Mac and host language differentiations.

PS/2 support is credited in large part to Akshay Srinivasan akshaysrinivasan@nitk.ac.in

A dedicated USB ID was generously supplied by Openmoko, Inc.

Password hash generation is implemented after the algorithm from the Android apps Twik (python implementation here) and HashIt!, which in turn are based on the chrome extension Password Hasher Plus.

It uses hmac-sha1 and sha1 implementations from avr-crypto-lib, licensed under GPL3.

License

Unless otherwise mentioned all code is licensed under GPL3.

If you create a firmware from this code you must change the vendor and product id!

Install

You will need a recent version of the LUFA usb stack to compile this software. If you want scrollwheel support for the mouse, the included patch needs to be applied. From this root directory, execute

$ git submodule init
$ git submodule update

To build, please adjust controller type and build switches in makefile. The hardware wiring needs to be specified in matrix.h . Further configuration can be achieved by editing src/config.h .

Valid ids can be retrieved from AVR demoes, or the keyboard examples of the LUFA lib.

Then simply call

$ make

Current Layout

Current default layout as implemented in keymap.h : ( discussion at deskthority and as a graphical layout )

RedTiltAdNW

Thumb keys & modifiers
                        Macro    TP
                        -        -
LShft LAlt LCtrl Space                  Mod1 Mod3 AltGr Fx
 -     Esc  Tab  Space                  BkSp Ret  -     -
                        LWin     Mod2
                        -        -
Layer 0 & Mod1 ( letters shifted)
K  U  Q  .: J     P  C  L  M  F
H  I  E  A  O     D  T  R  N  S
X  Y  -_ ,; /     B  G  W  V  Z
M2 / special
@  °  [  ]  #     !  <  >  =  &
\  /  {  }  *     ?  (  )  +  :
   $  |  ~  `     ^  %  "  '
M3 / MoveNum
PgUp BkSp  Up  Del  PgDo   ß 7 8 9 ä Ä
Pos1 Left Down Righ End    . 4 5 6 ö Ö
Esc  Tab  Ins  Ret  Undo   0 1 2 3 ü Ü
Mousekeys
tbd, see keymap.h

About

AVR keyboard firmware with PS/2 trackpoint support & macro mode.

License:GNU General Public License v3.0


Languages

Language:C 80.1%Language:Shell 9.2%Language:OpenSCAD 4.8%Language:C++ 4.0%Language:Makefile 1.9%