Keyboard shortcuts must be enabled in the Gmail settings.
Press Shift + ? for a complete list of all of the Gmail shortcuts.
Then press Tab and it will bring you to straight to a link to enable keyboard shortcuts. Press Enter on the link and keyboard shortcuts is turned on in your Gmail settings.
Note: If you use a screen reader, you may need to switch off the “virtual cursor”. Press Insert (or Caps Lock) + Z in JAWS or Insert (or Caps Lock) + Space in NVDA. Then the Shift + ? shortcut will work for you.
Whether keyboard shortcuts are enabled or disabled, you will be able to access the complete list of shortcuts by pressing Shift + ? and arrowing down.
Microsoft Edge and Mozilla Firefox work the same as above.
Note: You only have to switch on keyboard shortcuts once on your account in your chosen Web browser.