Given an input, move it along the keyboard by N characters
C, 217 bytes

char*t=" @A$%^*a)_(~.=/z-234567890\"'&gt;`?Z#SNVFRGHJOKL:&lt;MP{WTDYIBECUX]q\\&amp;=1snvfrghjokl;,mp[wtdyibecux}Q|!";l,d,k;f(char*s){for(l=strlen(s);s[--l]-32;);d=atoi(s+l);for(s[l]=0;d--;)for(k=l;k--;s[k]=t[s[k]-32]);puts(s);}


Readable version with whitespace, includes, etc:

#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;

char* t = " @A$%^*a)_(~.=/z-234567890\"'&gt;`?Z#SNVFRGHJOKL:&lt;MP{WTDYIBECUX]q\\&amp;=1snvfrghjokl;,mp[wtdyibecux}Q|!";
int l, d, k;

void f(char* s) {
    l = strlen(s);
    for( ; s[--l] - 32; );
    d = atoi(s + l);
    s[l] = 0;
    for ( ; d--; ) {
        for (k = l; k--; s[k] = t[s[k] - 32]);
    }
    puts(s);
}


The code pretty much speaks for itself. Just a lookup table that maps from each character to the next character, which is applied the given number of times. Much of the code is actually for parsing the number out of the input.