Skip to content

Instantly share code, notes, and snippets.

@craigmjohnston
Created May 21, 2015 12:25
Show Gist options
  • Save craigmjohnston/799d60a132056a748873 to your computer and use it in GitHub Desktop.
Save craigmjohnston/799d60a132056a748873 to your computer and use it in GitHub Desktop.
A mapping of the alphanumeric keys on a QWERTY keyboard to all adjacent alphanumeric keys. Intended for use in generating possible typos.
'1': ['q', '2'],
'2': ['1', 'q', 'w', '3'],
'3': ['2', 'w', 'e', '4'],
'4': ['3', 'e', 'r', '5'],
'5': ['4', 'r', 't', '6'],
'6': ['5', 't', 'y', '7'],
'7': ['6', 'y', 'u', '8'],
'8': ['7', 'u', 'i', '9'],
'9': ['8', 'i', 'o', '0'],
'0': ['9', 'o', 'p'],
'q': ['1', '2', 'w', 'a'],
'w': ['2', '3', 'q', 'e', 's'],
'e': ['3', '4', 'w', 'r', 'd'],
'r': ['4', '5', 'e', 't', 'f'],
't': ['5', '6', 'r', 'y', 'g'],
'y': ['6', '7', 't', 'u', 'h'],
'u': ['7', '8', 'y', 'i', 'j'],
'i': ['8', '9', 'u', 'o', 'k'],
'o': ['9', '0', 'i', 'p', 'l'],
'p': ['0', 'o', 'd'],
'a': ['q', 's', 'z'],
's': ['w', 'a', 'd', 'z', 'x'],
'd': ['e', 's', 'f', 'x', 'c'],
'f': ['r', 'd', 'g', 'c', 'v'],
'g': ['t', 'f', 'h', 'v', 'b'],
'h': ['y', 'g', 'j', 'b', 'n'],
'j': ['u', 'h', 'k', 'n', 'm'],
'k': ['i', 'j', 'l', 'm'],
'l': ['o', 'k'],
'z': ['a', 's', 'x'],
'x': ['z', 's', 'd', 'c'],
'c': ['x', 'd', 'f', 'v'],
'v': ['c', 'f', 'g', 'b'],
'b': ['v', 'g', 'h', 'n'],
'n': ['b', 'h', 'j', 'm'],
'm': ['n', 'j', 'k']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment