keyman icon indicating copy to clipboard operation
keyman copied to clipboard

feat(mac): Keyboard switching hotkeys

Open darcywong00 opened this issue 6 years ago • 5 comments

@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

darcywong00 avatar Dec 07 '18 03:12 darcywong00

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.

rfaramir avatar Dec 07 '18 18:12 rfaramir

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

DesBw avatar Dec 08 '18 22:12 DesBw

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.

rfaramir avatar Jan 11 '19 00:01 rfaramir

Received from Anna via private email:

  • While we're at it, I'd love it if I could toggle between English and Keyman using the caps lock key. It will let me toggle between English and the stock Greek keyboard this way, but not Keyman, for some reason.

mcdurdin avatar Jul 31 '22 22:07 mcdurdin

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

mcdurdin avatar Oct 11 '22 00:10 mcdurdin

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

MakaraSok avatar Apr 04 '23 04:04 MakaraSok

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.

MakaraSok avatar May 24 '23 04:05 MakaraSok

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...

DeadlySquad13 avatar Jun 15 '23 12:06 DeadlySquad13

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.

mcdurdin avatar Jun 16 '23 07:06 mcdurdin

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.

DeadlySquad13 avatar Jul 30 '23 09:07 DeadlySquad13

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:

  • The default shortcut to change the language on a Mac keyboard is Control+Space. Depending on the version of your computer, on some Macs, you may need to press Cmd+Space.

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

mcdurdin avatar Jul 31 '23 00:07 mcdurdin