Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't bring up input menu #1895

Open
jsatk opened this issue Dec 13, 2018 · 23 comments
Open

Can't bring up input menu #1895

jsatk opened this issue Dec 13, 2018 · 23 comments

Comments

@jsatk
Copy link

jsatk commented Dec 13, 2018

On macOS the keyboard shortcut to bring up the Input Menu to be able to use emoji, math symbols, etc, doesn't work. The keyboard shortcut is Ctrl + Command + Space.

@jsatk
Copy link
Author

jsatk commented Dec 13, 2018

This seems related to this:
#935

@chrisduerr
Copy link
Member

Not very familiar with the different input methods for emojis on macOS, but this might also be related to #1751.

There have been a few IME issues with the window library we're using, so potentially that's just something that's not supported yet. Though foreign languages seem to work fine, at least the input popup itself.

@jsatk
Copy link
Author

jsatk commented Dec 13, 2018

@chrisduerr basically Ctrl + Command + Space brings up an input menu. It defaults to emoji but it can be used for any non-standard English character.

The issue #1751 seems similar, but that is talking about a third-party app, Rocket. I'm talking about native macOS stuff. Out-of-the-box, Ctrl + Command + Space brings up the input menu on macOS.

@jsatk
Copy link
Author

jsatk commented Dec 13, 2018

@chrisduerr also FWIW, I'm a Rust newbie, but I'm totally willing to contribute where I can. I've recently started using Alacritty and therefore filed several issues as a result. But if I can give back in any way I'm down. 😄

nholstein added a commit to nholstein/alacritty that referenced this issue Apr 5, 2020
This implements a call to OSX's `orderfrontcharacterpalette()`[1] which
is the aptly named function to display the standard on-screen keyboard
for choosing emjoi and of characters.

Similar functionality exists in an undocumented and unexported function[2]
in the `winit` crate. A cleaner solution is to plumb this command through
the crates dependencies and avoid the additional explicit dependencies on
Objective-C macros in this crate.

Fixes alacritty#1895

1 https://developer.apple.com/documentation/appkit/nsapplication/1428455-orderfrontcharacterpalette?language=objc
2 https://github.com/rust-windowing/winit/blob/master/src/platform_impl/macos/util/mod.rs#L121-L124
@nholstein
Copy link

I spent some time to track this down. Not being familiar with macOS either it took a bit of digging to find orderFrontCharacterPalette() which does exactly this.

I've submitted a draft PR #3561 to implement this feature.

nholstein added a commit to nholstein/alacritty that referenced this issue Apr 5, 2020
This implements a call to OSX's `orderfrontcharacterpalette()`[1] which
is the aptly named function to display the standard on-screen keyboard
for choosing emoji and of characters.

Similar functionality exists in an undocumented and unexported function[2]
in the `winit` crate. A cleaner solution is to plumb this command through
the crates dependencies and avoid the additional explicit dependencies on
Objective-C macros in this crate.

Fixes alacritty#1895

1 https://developer.apple.com/documentation/appkit/nsapplication/1428455-orderfrontcharacterpalette?language=objc
2 https://github.com/rust-windowing/winit/blob/master/src/platform_impl/macos/util/mod.rs#L121-L124
@nholstein
Copy link

Chris, thanks for looking at this and providing quick feedback in the PR.

when it's a macOS specific thing implemented in a questionable fashion.

Agreed that its an unexpected implementation. (I spent a few hours last weekend reading through the macOS input methods documentation and getting nowhere. It turns out the implementation is in an entirely different place...)

I feel like this is a feature similar to support for SimpleFullscreen and #3245. It's specific to one platform, but Alacritty feels out of place and the missing functionality feels is jarring. To include emojis or em dashes in a readme I end up opening the emoji picker in Firefox's location bar, selecting, and then cut-n-pasting into Alacritty. What makes this a kicker is that this window is modal to one application; when switching between applications the dialog disappears entirely. This is unlike my experience with on screen keyboards in other operating systems which are global to the entire system: the character viewer only works for the application which requested it.

If the implementation complexity is hidden internally to glutin/winit would you be okay with adding the necessary keybinding support?

@chrisduerr
Copy link
Member

If the implementation complexity is hidden internally to glutin/winit would you be okay with adding the necessary keybinding support?

I'm not completely against adding it yet, though I do find it very questionable and it seems like an annoying platform specific detail which always leaves a bit of a bitter taste in my mouth.

I feel like ideally this would work through the IME interfaces of the platform, extending the existing input with additional options like Emojis. So my main question would be if it is possible to do so. If there's a reasonable workaround that works in a more platform independent and sensible fashion, I'd be inclined to advocate for that rather than adding a platform specific workaround.

@nholstein
Copy link

Sounds good (the approach, not the bitter taste. With full pun intended.... 🤮)

I'll see what I can find.

@voldemortensen
Copy link

voldemortensen commented Apr 7, 2020

I just hit this and agree that it is quite jarring. My current work around is to focus an input in another window, select the emoji, copy it, then paste it.

I've done a little digging and it looks like winit already has an implementation (which is basically the exact implementation in #3561). From what I can tell only the changes in bindings.rs and input.rs are needed (using ctx.window().open_emoji_picker() instead of ctx.window().show_emoji_and_symbols()).

https://github.com/rust-windowing/winit/blob/28023d9f5bb74b66a9b294b4c8fef6c46a9d9b92/src/platform_impl/macos/util/mod.rs#L121-L124

Update: I thought I remembered alacritty using winit, but can't find it now 🤷🏼‍♂️

@nholstein
Copy link

nholstein commented Apr 8, 2020

@voldemortensen, winit's implementation actually partly inspired my PR. After this PoC I created a draft commit on my system which extends winit::platform::macos::WindowExtMacOS instead. Since glutin directly exports this via glutin::window::Window Alacritty ends up using winit indirectly.

I tried digging a bit further in macOS's input method support, but haven't found any promising leads beyond orderFrontCharacterPalette(). I'll open a PR/issue in winit to get feedback there.

@jesseleite
Copy link

Just switched to Alacritty on Mac, and this is something I'm already missing. Always select emoji using Ctrl + Command + Space 😢

@ronisbr
Copy link

ronisbr commented May 3, 2021

Hi!

Is there any workaround for this issue? I really use the emoji picker a lot for symbols and greek letters.

@maxdesalle
Copy link

Same for me. This is an important feature which Alacritty seems to be missing right now in my opinion. And having to browser Emojipedia in order to find the emoji I'm looking for and copy-paste it into Alacritty isn't a viable solution.

@JensGM
Copy link

JensGM commented Sep 21, 2021

This would be nice to have

@ghost
Copy link

ghost commented Nov 30, 2021

If someone really wants this, they could probably hack a fork of git-cz in less than a day and create a carousel similar so what the util does for conventional commits:

Screen Shot 2021-12-01 at 4 23 48 AM

ipatch pushed a commit to ipatch/alacritty that referenced this issue Jan 20, 2022
This implements a call to OSX's `orderfrontcharacterpalette()`[1] which
is the aptly named function to display the standard on-screen keyboard
for choosing emoji and of characters.

Similar functionality exists in an undocumented and unexported function[2]
in the `winit` crate. A cleaner solution is to plumb this command through
the crates dependencies and avoid the additional explicit dependencies on
Objective-C macros in this crate.

Fixes alacritty#1895

1 https://developer.apple.com/documentation/appkit/nsapplication/1428455-orderfrontcharacterpalette?language=objc
2 https://github.com/rust-windowing/winit/blob/master/src/platform_impl/macos/util/mod.rs#L121-L124
@ezzieyguywuf
Copy link

iterm2 seems to have a solution for this. I agree that it is jarring to not have this.

@ipatch
Copy link

ipatch commented Jan 21, 2022

it was a big enough issue for me to pullin pr #3561 and rebase the current git master on top it. now i have emoji context menu.

https://github.com/ipatch/alacritty/tree/pr3561.ipatch.exp01

@ezzieyguywuf
Copy link

dang, but the PR was closed :(

ipatch pushed a commit to ipatch/alacritty that referenced this issue May 4, 2022
This implements a call to OSX's `orderfrontcharacterpalette()`[1] which
is the aptly named function to display the standard on-screen keyboard
for choosing emoji and of characters.

Similar functionality exists in an undocumented and unexported function[2]
in the `winit` crate. A cleaner solution is to plumb this command through
the crates dependencies and avoid the additional explicit dependencies on
Objective-C macros in this crate.

Fixes alacritty#1895

1 https://developer.apple.com/documentation/appkit/nsapplication/1428455-orderfrontcharacterpalette?language=objc
2 https://github.com/rust-windowing/winit/blob/master/src/platform_impl/macos/util/mod.rs#L121-L124
@kgadek
Copy link

kgadek commented May 11, 2022

FYI, I've taken amazing work of @nholstein and merged that on top of current main. I know this is not to be merged, but I wanted an up-to-date "workaround".

https://github.com/kgadek/alacritty/tree/emoji-picker

edit: Somehow I missed @ipatch's prior work, oops :(


I use this feature to insert various unicode characters: greek letters, arrows, etc. Hope a proper fix will land soon

@sukima
Copy link

sukima commented Jan 12, 2023

Is it possible to start a bounty? This thread seems to have stalled.

@tskj
Copy link

tskj commented Feb 9, 2023

I agree that this is very jarring and a strange experience in an app that claims to "support macOS".

@ezzieyguywuf
Copy link

(i switched to ChromeOS over this issue...)

@remmycat
Copy link

There's now an open issue for winit on this: rust-windowing/winit#3342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.