second keyboard, unique key presses?

view story

http://crunchbang.org – I'm learning asm. I'd like to plug in a second keyboard and assign macros to its keys. I'd like my primary keyboard to behave normally. So pressing 'A' on keyboard two would inject "add" into my document, perhaps with xdotool or something like it. Pressing "A" on keyboard one simply generates "A".In short, keyboard two would allow me to type assembler opcodes more quickly. Is this possible? How would I go about doing this? (HowTos)