#✅ | Use of ticker to detect specific or whatever input
1 messages · Page 1 of 1 (latest)
Hi! 👋 Please first click the button below to start this support ticket.
⚠️ It is not possible for anybody to send messages in this ticket before it has been started, so you need to click the button for others to be able to help/answer you.
Antes de seguir: ¿prefieres que te responda en español 🇪🇸? 🙂
That issue could be related to this bug: FancyMenu may not respect remapped modifier keys on macOS, if you’re using remapped Ctrl/Command keys, key detection can behave oddly.
For what you want, don’t use a Ticker if you can avoid it.
The better option is a Listener:
- Use On Keyboard Key Pressed
- Check the listener variables like
$$key_nameor$$key_keycode - Then run actions like Disable Layout, Enable Layout, or Toggle Layout
Example idea:
- Listener: On Keyboard Key Pressed
- IF
$$key_nameequals your key - Action:
disable_layoutwith the layout name
If you want to toggle a layout with a key, that is usually the cleanest way.
If you want, I can give you a tiny step-by-step setup for:
- one key disables a layout
- one key toggles a layout
- multiple keys with different actions
i dont get how to modify the listener condition xD
No worries 😄
In FancyMenu, the listener does not have a separate “condition” switch.
The condition goes inside the listener’s action script.
Do this:
- Open Customization -> Manage Listeners
- Edit your On Keyboard Key Pressed listener
- Open its Action Script
- Add an IF Statement
- Add a requirement inside it:
- use Is Text if you want to check
$$key_name - use Is Number if you want to check
$$key_keycode
- use Is Text if you want to check
- Put the action you want inside the IF block, for example:
disable_layout→my_layout
Simple example:
- IF
$$key_nameequalsF7 - then run
disable_layoutformy_layout
Important ⚠️
On Keyboard Key Pressed repeats while the key is held down, so if you want a single trigger per press, On Keyboard Key Released is often safer.
If you want, tell me:
- the key you want to detect
- the layout name you want to disable
and I’ll write the exact listener setup for you 👌
Tecla enter, los layouts funcionan
Sí, claro 😄
Para la tecla Enter, hazlo así:
- Ve a Customization -> Manage Listeners
- Abre tu listener de On Keyboard Key Pressed
- mejor aún: On Keyboard Key Released para que no se repita mientras mantienes la tecla
- En su Action Script, añade un IF Statement
- Dentro del IF, pon esta condición:
- Requirement:
Is Text - Text:
$$key_name - Compare with:
Enter
- Requirement:
- Dentro del IF, añade la acción:
disable_layout- valor: el nombre exacto de tu layout
Si quieres activar/desactivar con Enter en vez de solo desactivar, usa:
toggle_layouten lugar dedisable_layout
Si Enter no te lo detecta por nombre, usa $$key_keycode en vez de $$key_name y selecciona la tecla Enter desde el selector del requisito ⚠️
Si quieres, te lo escribo en formato “árbol” exacto de cómo debe quedar en el editor 👌