The current keyboard approach works somewhat, but as @j4james pointed out in #6, this might not be sufficient for more advanced editing tasks.
Right now we emulate ctrl/shift/etc presses as needed to get the correctly-modified keypresses to match the user's OS inputs. For this emulation to be more accurate, we probably need to move to a closer mapping between the emulator keyboard state and OS keyboard state.
I'm open to suggestions here, especially if there is some prior art in other emulators that handle this well!