PUB! Programmable USB Button

PUB! is a Programmable USB Button on which you can program with a sequence of keystrokes. When you press the button those keystrokes are "replayed" over a USB connection

The button is programmed using an innovative and slightly quirky interface that does not require any custom software to be installed on your computer. All you need is a text editor like Notepad or gedit.

Features

Futures

The possibilities are fairly broad including:

Construction

http://www.instructables.com/id/PUB-Programmable-USB-Button/

How To Use

You want to program your password onto the PUB! button

PUB! Programmable USB Button v0.92
Main:   Turn=Select, Press=OK, Press+Turn=Set At, Press+Hold=Exit
    0    Set Keystroke at 00

At Code Action

PUB! Programmable USB Button v0.92
Key:    Turn=Select, Press+Turn=Modify, Press=OK, Press+Hold=Return
00 0004 a

At Code Action 

PUB! Programmable USB Button v0.92
Key:    Turn=Select, Press+Turn=Modify, Press=OK, Press+Hold=Return
01 0006 c

At Code Action
00 0006 c 

PUB! Programmable USB Button v0.92
Key:    Turn=Select, Press+Turn=Modify, Press=OK, Press+Hold=Return
03 0017 t 

At Code Action 
00 0006 c 
01 0004 a 
02 0017 t 

PUB! Programmable USB Button v0.92
Main:   Turn=Select, Press=OK, Press+Turn=Set At, Press+Hold=Exit
   0    Set Keystroke 03

At Code Action
00 0006 c
01 0004 a
02 0017 t
PUB! Programmable USB Button v0.92
Main:   Turn=Select, Press+Turn=Set At, Press=OK, Press+Hold=Exit
   D    Do Local Function at 03

At Code Action
00 0006 c
01 0004 a
02 0017 t 
PUB! Programmable USB Button v0.92
Do: Turn=Modify, Press+Turn=Select, Press=OK, Press+Hold=Return
Save to EEPROM

At Code Action
00 0006 c
01 0004 a
02 0017 t
Saved in EEPROM
cat

Here is an example of a more complicated script that contains conditional logic:

At Code Action
00 E005 Let W = 05
01 0004 a
02 0005 b
03 0006 c
04 E200 Put W in R00
05 E500 Say R00
06 EF01 Wait 1 sec
07 0028 Enter
08 E801 Let W = W - 01
09 F701 Jump if Not Zero to 01

The result, displayed in gedit for example, would be:

abc05
abc04
abc03
abc02
abc01

Menu Functions

The menus, if fully expanded, would look like this:

RUN mode 
    This is the normal operation mode 
    Press to begin playback
    Press and hold to enter PROGRAM mode

PROGRAM mode 
Main menu
0        Set Keystroke (e.g. A, Enter) 
    0mxx Keystroke xx using modifier m 
         Rotate to select xx (e.g. A)
         Press+Rotate to select m (e.g. CTL+SHIFT)
         (too many to list them all here)
1        Set System Control Command (e.g. power off)
    1mxx System Control Command xx (m is ignored)
         Rotate to select xx 
2        Set Consumer Device Command (e.g. play, pause) 
    2xxx Consumer Device Command xxx 
         Rotate to select xxx 
D        Do Local Function 
    D0xx Delete action at xx 
    D1xx Redisplay (xx is ignored) 
    DExx Load from EEPROM (xx is ignored) 
    DFxx Save to EEPROM (xx is ignored) 
E        Execute Instruction 
    E0xx Let W = xx 
    E1xx Get W from Rxx 
    E2xx Put W in Rxx 
    E3xx Compare W to xx 
    E4xx Compare W to Rxx 
    E5xx Say Rxx 
    E6xx Format xx (display format that Say uses) 
    E7xx Let W = W + xx 
    E8xx Let W = W - xx 
    E9xx Set all registers to xx 
    EAxx Let W = W + Rxx 
    EBxx Let W = W - Rxx 
    ECxx Let W = W x Rxx 
    EDxx Let W = W / Rxx 
    EExx Wait xx milliseconds 
    EFxx Wait xx seconds 
F        Jump On Condition 
    F0xx Jump Relative by xx 
    F1xx Jump if Carry to xx 
    F2xx Jump if High to xx 
    F3xx Jump if High or Carry to xx 
    F4xx Jump if Low to xx 
    F5xx Jump if Low or Carry to xx 
    F6xx Jump if Not Zero or Carry to xx 
    F7xx Jump if Not Zero to xx 
    F8xx Jump if Zero to xx 
    F9xx Jump if Zero or Carry to xx 
    FAxx Jump if Not Low or Carry to xx 
    FBxx Jump if Not Low to xx 
    FCxx Jump if Zero or Low to xx 
    FDxx Jump if Not High to xx 
    FExx Jump if Not Carry to xx 
    FFxx Jump to xx