randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.39k stars 81 forks source link

Unable to use special characters within Terminus #366

Closed merc1er closed 1 year ago

merc1er commented 2 years ago

Special characters requiring specific key combinations are not input into Terminus on macOS. For example, the { character has the following key combination (macOS - AZERTY keyboard): option + (. Same goes for }, | and so on.

This restricts considerably the convenience of Terminus as these characters are common for developers.

randy3k commented 2 years ago

You might need to override some of the keybindings in https://github.com/randy3k/Terminus/blob/master/Default.sublime-keymap Try the following, though I haven't tested it as I don't own any keyboards other than standard US QWERTY.

{ "keys": ["alt+5"], "command": "terminus_keypress", "args": {"key": "{"}, "context": [{"key": "terminus_view"}] },
merc1er commented 2 years ago

Thanks!

I tried this but it doesn't seem to be overwriting keys.
Just to be sure, I add this line to Preferences > Package settings > Terminus > Command palette right?

I tried adding:

{ "keys": ["a"], "command": "terminus_keypress", "args": {"key": "{"}, "context": [{"key": "terminus_view"}] },

But pressing a still shows a.

choallin commented 1 year ago

@merc1er Did you find a solution? I'm using a germain keyboard on a mac and have the same problems...

merc1er commented 1 year ago

@merc1er Did you find a solution? I'm using a germain keyboard on a mac and have the same problems...

No, sadly I could not get it to work even after re-binding keys 😢

randy3k commented 1 year ago

@merc1er

Actually, the setting should go to Preferences: Terminus Keybindings

image

merc1er commented 1 year ago

@merc1er

Actually, the setting should go to Preferences: Terminus Keybindings

image

Oh, yes. That worked!

@choallin here is what I added for it to work on a French Apple keyboard:

{ "keys": ["alt+5"], "command": "terminus_keypress", "args": {"key": "{"}, "context": [{"key": "terminus_view"}] },
{ "keys": ["alt+)"], "command": "terminus_keypress", "args": {"key": "}"}, "context": [{"key": "terminus_view"}] },
{ "keys": ["alt+shift+l"], "command": "terminus_keypress", "args": {"key": "|"}, "context": [{"key": "terminus_view"}] },