5

I've got my system language set to Spanish, as well as my keyboard input language. However, I'm used to search emojis in all apps that let you do so in English language (Telegram, Twitter, WhatsApp...).

From what I've seen, emoji keyboard in Windows 10 (press keys: Win + .) lets you search emojis but only using your system language. So if I try to search for "eyes", the suggestions will come empty since "eyes" does not exist in Spanish, so what I use to search this specific emoji in all the other apps does not work with this emoji keyboard search.

Even in my work laptop, where I have the system language set up in English, I have to use different words than in my personal laptop although I'm using the same application because of the different system language.

Is there any way I can specify that I want to search emojis using a specific language and not my system language? Or maybe using both: the one I specify and my system language as default if nothing is found?

This is the only app that gets affected by this issue, so messing around with global system configurations would not be an option.

Thank you so much.

Unapedra
  • 337
  • 2
  • 6
  • Yes, I've read this link, but this changes global settings and could affect other application's behaviour, which is not a desired side-effect just to use an emoji: https://superuser.com/questions/1565439/windows-10-emoji-panel-text-input-only-searches-one-language – Unapedra Nov 13 '21 at 15:21
  • Try: Add the English keyboard layout as your second one after Spanish, run *Settings > Devices > Typing*, scroll to the bottom and click "Advanced keyboard settings", then set "Override for default input method" to English. – harrymc Nov 13 '21 at 15:48
  • But that will change the language of input for the whole system which is what I didn't want to do, since now if I press '?', it will write '_' everywhere. I'd like to keep my language as it is: system language to spanish, input language to spanish, but just tell emoji keyboard to use another language as "source" of its dictionary. – Unapedra Nov 16 '21 at 21:36
  • You should be able to change the language to Spanish in the Language Bar. However, the emoji search might be in English (if this method works). – harrymc Nov 16 '21 at 21:39
  • @Senthe and poster: I assume my above idea didn't work for you. Question: Do you have installed the English keyboard, and does emoji search work in English when it's invoked via the English keyboard? – harrymc Jun 12 '22 at 10:10
  • @harrymc, yes, I have the English keyboard installed, and I can switch to it without changing the system's display language (currently set to Polish). Then the emoji search works as expected in English, and stops working in Polish. However, the problem with that setting is that whenever I use e.g. "Alt+E", I get "é" instead of "ę". So essentially I can search for emojis in English, but I lose the ability to use the Polish diacritics, i.e. I cannot type in my native language anymore. – Senthe Jun 13 '22 at 12:02
  • @Senthe: Do one more test: Call up the Emoji Panel when the keyboard is in Polish, change the keyboard to English while it is activated. Which language is this panel using now, English or Polish? – harrymc Jun 13 '22 at 12:12
  • @harrymc Sorry, I tried, but I don't know how to accomplish that. The emoji panel hijacks focus similarly to e.g. Start Menu, and closes as soon as I click outside of it (or try to alt-tab), so I can't keep it open as I change the settings. I wonder, did you actually try to solve this yourself locally? – Senthe Jun 14 '22 at 14:54
  • I can't try, as I my language is English. I'll try tomorrow to create a test for you. – harrymc Jun 14 '22 at 15:40
  • @harrymc you can install an additional language with an associated keyboard layout any time, try it out. – Senthe Jun 15 '22 at 12:24

1 Answers1

2

I have done some tests with the emoji panel, and it's very problematic.

First, any change of the system language will cause it to terminate immediately, so language changes need to be done before launching it.
Second, there is no way to launch it except via the keyboard, nor to programmatically detect when it runs or when it terminates.

My solution (that works in my environment) is a script that intercepts Win+; and does the following (to use Win+. change the line with $#;:: to $#.::):

  • Conserves the current active window and system language
  • Changes the system language to English US
  • Issues the key Win+; (not intercepted this time)
  • Waits for the previous active window to become active again (meaning the language panel was terminated)
  • Resets the system language to what it was.

The tool I used is the free AutoHotkey.

In the script below, the section between "start debug" and "end debug" is only for your convenience and should be deleted once everything works.

curlang := 0

; >>>> start debug : function keys for testing

; https://docs.microsoft.com/en-us/previous-versions/ms957130(v=msdn.10)
F7:: SetDefaultKeyboardLang(0x0409)    ; english usa
F8:: SetDefaultKeyboardLang(0x040c)    ; french
F9:: SetDefaultKeyboardLang(0x0415)    ; polish
F12::                                  ;- show current keyboard language
SetFormat, Integer, H
curlang:= DllCall("user32.dll\GetKeyboardLayout", "UInt", ThreadId, "UInt")
msgbox,Language identifier=%curlang%
curlang := 0
Return

; <<<< end debug

$#;::                                  ; intercept win+;
WinGet, activewin, ID, A
curlang:= DllCall("user32.dll\GetKeyboardLayout", "UInt", ThreadId, "UInt")
ActiveHwnd := WinExist("A")
SetDefaultKeyboardLang(0x0409)         ; english usa
Sleep, 100
Send, {LWin down}`;{LWin up}           ; semi-colon needs to be escaped
curlang := 0
SetTimer, waitactive, 200
return

waitactive:
if WinActive("ahk_id" activewin) {
  SetDefaultKeyboardLang(curlang)
  SetTimer, waitactive, Off
}
return

;-------------------------------
; https://autohotkey.com/boards/viewtopic.php?f=6&t=18519
SetDefaultKeyboardLang(LocaleID){
    Static SPI_SETDEFAULTINPUTLANG := 0x005A, SPIF_SENDWININICHANGE := 2    
    Lan := DllCall("LoadKeyboardLayout", "Str", Format("{:08x}", LocaleID), "Int", 0)
    VarSetCapacity(binaryLocaleID, 4, 0)
    NumPut(LocaleID, binaryLocaleID)
    DllCall("SystemParametersInfo", "UInt", SPI_SETDEFAULTINPUTLANG, "UInt", 0, "UPtr", &binaryLocaleID, "UInt", SPIF_SENDWININICHANGE) 
    WinGet, windows, List
    Loop % windows {
        PostMessage 0x50, 0, % Lan, , % "ahk_id " windows%A_Index%
    }
}

After installing AutoHotKey, put the above text in a .ahk file and double-click it to test. You may stop the script by right-click on the green H icon in the traybar and choosing Exit. To have it run on login, place it in the Startup group at
C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Useful AutoHotkey documentation:

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • Wow. I hoped there would be an easier solution, but I can see Microsoft hasn't thought of it. This seems to be the only way. Thank you so much! – Unapedra Jun 16 '22 at 07:02
  • The open-source project [winMoji](https://github.com/ryanSN/winmoji) might be simpler to use. – harrymc Jun 16 '22 at 15:47
  • @harrymc This almost works, but I have a problem where the emoji panel immediately closes upon entering the timer loop. I think the window we're typing in doesn't *actually* lose focus and stays marked as "active" the entire time. Is there a way to hook this to some actual "is emoji panel open" Windows variable? – Senthe Jun 16 '22 at 15:50
  • It might be that in your case the language is changed back immediately and that causes the emoji panel to close immediately. In this case, delete the line `SetTimer, waitactive, 200` and use F9 to change the language back to Polish manually. See if it works this way. – harrymc Jun 17 '22 at 08:34
  • @harrymc Well, yes, it does, but it makes this only half of a solution. Are you confident there is no other option to make it switch back automatically when the emoji panel is closed? – Senthe Jun 17 '22 at 13:29
  • I haven't found one, and I tried... – harrymc Jun 17 '22 at 13:56
  • @harrymc Well, I awarded the bounty and I'm grateful for your help, though I'd still love for someone to prove there is some better solution to this problem : ( – Senthe Jun 18 '22 at 17:32
  • Me too, and thanks. – harrymc Jun 18 '22 at 18:10