The behavior of tab and return (and sometimes delete, space, etc.) is really annoying.
Sometimes tab means “put a tab character into the text”, sometimes it is overloaded in software to mean “indent the text”, and sometimes it means “advance to the next field”.
Likewise, return can either mean “put a newline into the text” or “submit the form page” or “activate a button”.
The problem with this is that because programs handle these keystrokes directly at the keystroke level, by judging which physical key was pressed and then performing the action they consider appropriate, it is absolutely impossible to split these separate actions and assign them to separate keys.
Designing custom keyboard layouts would be 1000% better if there was a clean software layer in between physical keypresses and semantic actions, such that they could be properly split by new keyboard layouts. Such a system sort of exists for just standard text boxes in OS X dating from the NeXT days albeit not designed to actually separate various functions of the tab key in different contexts as I would like (cf.
http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html), but it’s been getting worse over time as new Apple developers break things they don’t know about, and a huge amount of software implements its own half-assed ****ty text boxes that do the wrong thing. And then of course, other keyboard interaction is defined by each application in its own way, usually badly. Finally, when you get to browser-based webapps, keyboard handling is just a pile of poop.
Sigh.
Anyway, short answer is: the “tab” key is both a function key and a text input key. You should color it with stripes.
But more seriously: just make all the keys a single solid color with no legends, and your problem is solved.