I tired to do the following:
- Select the original US Keyboard layout as my current keyboard.
- Launched Ukelele
- Chose New > From current input source
- Swapped a single key
- Saved the file in my keyboard layouts and chose it as my input method.
Now when I try to type in Chrome, it doesn't output anything. It works fine in other apps such as TextEdit, though.