Emulate the Professor's typing
Python 2 - 269 275 290 318 337
Input is mostly safe if you use triple-quotes:&quot;&quot;&quot;print(&quot;Hello, World!&quot;); sys.exit()&quot;&quot;&quot;
C=D=0
r=''
l,u,c=&quot; `1234567890-=qwertyuiop[]asdfghjkl;'#\\zxcvbnm,./&quot;,' \xac!&quot;\xa3$%^&amp;*()_+QWERTYUIOP{}ASDFGHJKL:@~|ZXCVBNM&lt;&gt;?',&quot; `1234567890-=QWERTYUIOP[]ASDFGHJKL;'#\\ZXCVBNM,./&quot;
for h in input():w=h!=' ';U=h in u;C^=w&amp;U&amp;~D;D=U&amp;w;r+=[l,c][C][[l,u][U].find(h)]
print r

Encoding doesn't seem to help much, except with the awkward ¬ and £ characters (I've tried looking at other problems like this and I think I should try to use split?)(It doesn't seem like the keyboard compresses enough to make it worth .decode, etc...)
Also, spaces suck.
Edit note: Indexing is weird