keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
387 stars 107 forks source link

feat(mac): Keyboard switching hotkeys #1401

Open darcywong00 opened 5 years ago

darcywong00 commented 5 years ago

@Dellu writes

It would be really nice if the keyboards can be switched with the hotkeys.

Keyman Desktop Configuration has a default hotkey "Left Alt + Shift" to Open Language Switcher

rfaramir commented 5 years ago

On Mac, Option+Shift is a fairly common double modifier combination. These are just a few of the characters that would not by typeable and would instead switch your keyboard out if you tried to type them: °, €, —, ±, ‰, Ø, ∏, Å, , Æ, Œ, Ç, ¿

Not arguing against a hotkey to switch keyboards, just this particular default.

DesBw commented 5 years ago

Like rfaramir, the Shift+alt combination is assigned to multiple other tasks in the mac. It doesn't work to switch the language.

rfaramir commented 5 years ago

By "switching keyboards" this PR means switching between Keyman keyboards, right?

I ask because there's already a shortcut for switching Input Methods: Cntrl+Space for previous Input Method and Cntrl+Option+Space for the next Input Method in the Input menu. This is not enabled by default, but can be activated with one click in System Preferences->Keyboard->Shortcuts tab->Input Sources.

mcdurdin commented 2 years ago

Received from Anna via private email:

mcdurdin commented 1 year ago

Also: https://community.software.sil.org/t/advice-on-creating-keyboard-shortcut-to-toggle/6773/4

MakaraSok commented 1 year ago

Also: https://community.software.sil.org/t/switching-between-keyman-keyboards-in-macos/7402/2.

MakaraSok commented 1 year ago

HI! I LOVE the keyman keyboards.

I use MacBook Pro and recently installed & started using Keyman & Heidelberg Solutions Input Devanagari & Transliteration. For Sanskrit class.

But when I tried to set-up short-cut / hotkeys to switch between keyboards: it seems Mac doesn´t support it? https://keyman.com/mac/ (unticked in the MacOS features box)

IS THERE an alternative way to create hotkeys for switching keyboards on Mac? Thanks. It would save me time not having to click on menu everytime I switch languages. There are plenty of other students using MAC with the same problem.

DeadlySquad13 commented 1 year ago

While I believe that there exists workaround to switch via some API (not found in 5 years though) maybe it is better to convert keyman keyboards to system keyboard layouts or register them as such?

I see a lot of limitations in current implementation: because all keyboards are registered under single keyman input method it's impossible to switch them via built-in system shortcut and when apps are switched keyboards don't change automatically to the previously used.

In linked investigation I see that unfortunately it's not as easy as it should be. But I still don't understand: keyman is somehow registered as input method - maybe it's possible to register it multiple times for each keyboard? For instance: keyman - en, keyman - jp...

mcdurdin commented 1 year ago

maybe it is better to convert keyman keyboards to system keyboard layouts or register them as such?

Keyman does a bunch of things which built-in Mac keyboards can't do, so conversion isn't really a way forward for us.

But Keyman is already registered as a layout under 'mul'. The problem is that this appears to be a build-time-only setting in a plist, and the apparent APIs which exist didn't, at the time we tested, seem to work (and were not really documented either). This is something on our agenda to address but we have very constrained resources so I can't give a timeframe.

DeadlySquad13 commented 1 year ago

maybe it is better to convert keyman keyboards to system keyboard layouts or register them as such?

Keyman does a bunch of things which built-in Mac keyboards can't do, so conversion isn't really a way forward for us.

But Keyman is already registered as a layout under 'mul'. The problem is that this appears to be a build-time-only setting in a plist, and the apparent APIs which exist didn't, at the time we tested, seem to work (and were not really documented either). This is something on our agenda to address but we have very constrained resources so I can't give a timeframe.

Thanks for reply, I will wait patiently for this issue solution! Unfortunately, for now keyman on macos seems almost unusable for me because I have to switch languages often.

mcdurdin commented 1 year ago

Unfortunately, for now keyman on macos seems almost unusable for me because I have to switch languages often.

If you are using only one Keyman keyboard, then you can switch it with the mac language switch hotkey:

If you are using multiple Keyman keyboards, then for now we don't have a better answer, sorry 😢

mcdurdin commented 4 weeks ago

@SabineSIL FYI