Perl, 5956 bytes
#!perl -p 'qwertyuiop asdfghjkl zxcvbnm'=~/$_ ?/;$_=$';s/.\K\B\B/ /g Counting the shebang as 3, input is taken from stdin. If a leading newline isn't a concern for inputs p and l, then /$_\n?/ could be replaced with a bare $_ to save 4.
Sample Usage
$ echo g|perl qwerty.pl h j k l z x c v b n m $ echo v|perl qwerty.pl b n m