Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.48k stars 97 forks source link

Toolbar button to turn on or off custom accessibility feature #1193

Closed AxesandGrinds closed 2 weeks ago

AxesandGrinds commented 3 weeks ago

Discussed in https://github.com/Helium314/HeliBoard/discussions/1192

Originally posted by **AxesandGrinds** November 2, 2024 I want to add a feature to your Heliboard virtual keyboard that can be activated and deactivated from the virtual keyboard's toolbar. I need to add a button for the activated state and another button for the deactivated state. This button will always be visible in the keyboard's toolbar whenever the virtual keyboard is open as it is the main feature of my app. After downloading your code, I see that the changes need to be made in several files, such as ToolbarUtils.kt, InputLogic.java, keyCode.kt, and KeyboardIconsSet.kt in order to add the drawable for the icon, position it in the toolbar, and perform an action when it's activated. My problem is that in your code, I can't seem to find the part of your code that can update the button's drawable (depending on active or inactive state of the feature). Can you give me some general guide on how to do this? The goal of the feature that I'm trying to add is to provide the user with some custom accessibility function when that button (feature) is activated.
AxesandGrinds commented 2 weeks ago

This question was answered in the General (https://github.com/Helium314/HeliBoard/discussions/1192). You can close this issue. Thanks!