Replace tap_code() with register_code()/unregister_code() in the modifier
rewrite system so that holding a rewritten key combo (e.g. Ctrl+Left →
Alt+Left on Mac) produces auto-repeat instead of a single tap. Track active
rewrites to correctly restore modifiers on release, handling edge cases like
the modifier being released before the trigger key.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>