A loose spellchecker John Doe used to be one of the fastest QWERTY keyboard typists in the world, but a recent head injury caused by a stampeding herd of downgoats has critically hampered his ability to type accurately. In a desperate effort to retain his reputation as a typing prodigy, he has tasked us with the creation of a spellchecker - well, sort of. This spellchecker's rigged so that John Doe can worry less about accuracy and more about speed.
Challenge
Here's the keyboard you'll be using. NOTE: non-spacebar keys are separated by 2 spaces, with the unshifted key followed by the shifted key.
`~   1!  2@  3#  4$  5%  6^  7&amp;  8*  9(  0)  -_  =+
Tab  qQ  wW  eE  rR  tT  yY  uU  iI  oO  pP  [{  ]}  \|
     aA  sS  dD  fF  gG  hH  jJ  kK  lL  ;:  '&quot;  enter
     zZ  xX  cC  vV  bB  nN  mM  ,&lt;  .&gt;  /?
             [    SPACEBAR    ]

Notice how I have arranged the keys to line up properly. This is crucial for this challenge to work.
Write a full program/function that, given 2 strings of equal length containing only characters from the above keyboard, outputs a truthy/falsy value according to the following:

If all characters' keys are at most 1 away (horizontally, vertically, or diagonally) from the characters' keys at the same index in string 2, then output truthily.

Example using a: Any characters in aAqQsSzZwWxX or \t (tab key) would return truthily.

Special cases: \n (enter key) would return truthily for any character in [{]}\|'&quot; or \n. Spaces (spacebar key) would return truthily for any character in xXcCvVbBnNmM,&lt; or spaces.


Otherwise, output falsily.
Note: Tabs and newlines will be actual representations instead of their escaped equivalents (\t and \n).

This is code-golf; shortest code wins.
Example test cases
String1     String2        Output
---------------------------------
asdf        QWeR        =&gt; true
cat         gsl         =&gt; false
12345       qWeRty      =&gt; true
John Doe    Jonh Deo    =&gt; false
JavaScript (ES6), 287 bytes

(a,b)=&gt;[...a].map((l,i)=&gt;{p=k[g="indexOf"](l);q=k[g](o=b[i]);r=r?l==s|o==s?~m[g](l)&amp;&amp;~m[g](o):(x=(p%28/2|0)-(q%28/2|0))&lt;2&amp;x&gt;-2&amp;(y=(p/28|0)-(q/28|0))&lt;2&amp;y&gt;-2:0},r=k=`\`~1!2@3#4$5%6^7&amp;8*9(0)-_=+  \t qQwWeErRtTyYuUiIoOpP[{]}\\|  aAsSdDfFgGhHjJkKlL;:'"
     zZ${m="xXcCvVbBnNmM,&lt;"}.&gt;/?`,m+=s=" ")|r


Explanation

Returns 1 for true and 0 for false.

Note that the \t should be a literal tab character.

(a,b)=&gt;
  [...a].map((l,i)=&gt;{               // for each character l at index i in word A
      p=k[g="indexOf"](l);          // p = index of l in k
      q=k[g](o=b[i]);               // o = letter in word B, q = index of o in k
      r=r?                          // if r
        l==s|o==s?                  // if l or o is a space
          ~m[g](l)&amp;&amp;~m[g](o)        // check the space-matching characters for l and o
        :
          (x=(p%28/2|0)-(q%28/2|0)) // X distance between letters A and B
            &lt;2&amp;x&gt;-2&amp;                // if distance is 2 or greater, r = 0
          (y=(p/28|0)-(q/28|0))     // Y distance between letters A and B
            &lt;2&amp;y&gt;-2                 // if distance is 2 or greater, r = 0
      :0                            // do nothing if r == 0
    },
    r=                              // r = result

    // Keyboard string, each row is 28 characters long, using spaces as padding
    k=`\`~1!2@3#4$5%6^7&amp;8*9(0)-_=+  \t qQwWeErRtTyYuUiIoOpP[{]}\\|  aAsSdDfFgGhHjJkKlL;:'"
     zZ${m="xXcCvVbBnNmM,&lt;"}.&gt;/?`,

    m+=                             // m = list of characters that are adjacent to space
    s=" "                           // add space to the list, s = space character
  )
  |r                                // return r


Test



var solution = (a,b)=&gt;[...a].map((l,i)=&gt;{p=k[g="indexOf"](l);q=k[g](o=b[i]);r=r?l==s|o==s?~m[g](l)&amp;&amp;~m[g](o):(x=(p%28/2|0)-(q%28/2|0))&lt;2&amp;x&gt;-2&amp;(y=(p/28|0)-(q/28|0))&lt;2&amp;y&gt;-2:0},r=k=`\`~1!2@3#4$5%6^7&amp;8*9(0)-_=+  \t qQwWeErRtTyYuUiIoOpP[{]}\\|  aAsSdDfFgGhHjJkKlL;:'"
     zZ${m="xXcCvVbBnNmM,&lt;"}.&gt;/?`,m+=s=" ")|r
A = &lt;input type="text" id="A" value="John Doe" /&gt;&lt;br /&gt;
B = &lt;input type="text" id="B" value="Jonh Deo" /&gt;&lt;br /&gt;
&lt;button onclick="result.textContent=solution(A.value,B.value)"&gt;Go&lt;/button&gt;
&lt;pre id="result"&gt;&lt;/pre&gt;