#Java 8, 159 158 bytes
Java 8, 159 158 bytes
n->s->{for(int i=s.length,j;i-->0;)for(String x:"1234567890;QWERTYUIOP;ASDFGHJKL;ZXCVBNM".split(";"))if((j=x.indexOf(s[i])+n)>=n)s[i]=x.charAt(j%x.length());} -1 byte thanks to @OlivierGrégoire modifying the input-array instead of printing directly.
Explanation:
n->s->{ // Method with integer and character-array parameters, and no return-type for(int i=s.length,j;i-->0;) // Loop over the input character-array with index for(String x:"1234567890;QWERTYUIOP;ASDFGHJKL;ZXCVBNM".split(";")) // Inner loop over the qwerty-lines if((j=x.indexOf(s[i])+n)>=n) // If the current qwerty-line contains the character // Set `j` to the index of this character on that line + input `n` s[i]=x.charAt(j%x.length());} // Replace the character at index `i` // with the new character (at index `j` modulo length_of_qwerty_line)