Typing, but to the left Background

You've been given a task to take notes for a meeting. You start typing on your Google Doc, but you don't have enough time during the meeting to look at your keyboard while you type.

Fortunately for you, you can type without looking at your keyboard. After the meeting, you realize that everything you typed was one key to the left.

The Challenge

For this challenge, you will be using the letters, numbers, and space bar of the QWERTY keyboard layout.


Given an input of text (from any standard input method), output the resulting text, where every character is moved one to the left on the keyboard.


For the majority of letters, just look at the letter and translate it to the letter to the left (c becomes x, t becomes r, etc).
For letter q, translate to a literal tab character (\t).
For letter a, enable caps lock, so the capitalization of the rest of the string is reversed.
For letter z, capitalize the next letter in the string.
No translation is required for the space bar.

Preserve capitalization while translating, and be mindful of caps lock (if caps lock is enabled, make sure the case is the opposite).
All characters in the input string will be letters, numbers, or a space. No punctuation or other characters can be included.


Test Cases

\t is a literal tab character

Hello world    -&gt; Gwkki qieks
Code Golf      -&gt; Xisw Fikd
Queried apples -&gt; \tyweuws OOKWA


Scoring

Lowest score in bytes wins. Have fun!
JavaScript (V8), 271 bytes

f=(s,k='~!@#$%^&amp;*()_+`1234567890-=\tQWERTYUIOP{}|\tqwertyuiop[]\\ASDFGHJKL:&quot;\n\\asdfghjkl;\'ZXCVBNM&lt;&gt;?zxcvbnm,./')=&gt;s.replace(/[^ ]/g,c=&gt;k[k.indexOf(c)-1]).replace(/\\([^\\]*)\\?/g,(m,c)=&gt;c.replace(/[a-zA-z]/g,l=&gt;l&gt;'Z'?l.toUpperCase():l.toLowerCase())).replace(/[?']/,&quot;&quot;)

Try it online!
My first JavaScript code golf.
It could definitely be shorter, but I think this is a good start.
It basically finds each character in the k string and replaces it with the previous one, then swaps the case of everything between the A or a, and removes all occurences of Z or z (as shift key does nothing on its own).
This should be a normal QWERTY keyboard layout, but let me know if not.