Fix macOS special character input in terminal (Issue #41)
- Add custom keyboard event handler for macOS Option key combinations - Enable Option+7 to input pipe symbol (|) in Safari and Firefox - Support additional special characters: @, €, [, ], commonly used on macOS - Use both e.key and e.code for robust keyboard layout compatibility - Only activate on macOS platform to avoid affecting other systems - Maintain xterm.js native handling as primary with custom handler as fallback Resolves GitHub Issue #41 where users couldn't type pipe symbol with Option+7 on Mac.
This commit is contained in:
@@ -175,6 +175,7 @@ export const Terminal = forwardRef<any, SSHTerminalProps>(function SSHTerminal(
|
||||
allowTransparency: true,
|
||||
convertEol: true,
|
||||
windowsMode: false,
|
||||
// Keep Option key for special characters on macOS (false = allows special chars, true = Meta key)
|
||||
macOptionIsMeta: false,
|
||||
macOptionClickForcesSelection: false,
|
||||
rightClickSelectsWord: false,
|
||||
|
||||
Reference in New Issue
Block a user