How to force the '#' symbol to be visible on the Jetpack Compose keyboard by default?


Problem:

I have a tagging system in my app much like Instagram or Twitter where the user can type a '#' symbol and choose a tag.

To make this a seamless as possible I want to always display the '#' key by default. This is easy to achieve in iOS with swiftUI (keyboardType(.twitter)) but I'm yet to find a way to do it in Android with Jetpack Compose.

I've tried the various KeyboardOptions but none guarantee the '#' visibility.

I've attached an image of what I'm trying to achieve from the iOS keyboard where the '#' is displayed on the bottom right.

![Example keyboard from iOS where '#' is displayed

Question:

Is there a specific keyboard type that makes the '#' key part of the default keyboard, or do I need to look into creating a custom keyboard for my use case?

3
Jul 10 at 9:54 AM
User AvatarOscar Nowell
#android#android-jetpack-compose#keyboard

Accepted Answer

> I'm yet to find a way to do it in Android with Jetpack Compose

This has nothing to do with Jetpack Compose.

> Is there a specific keyboard type that makes the '#' key part of the default keyboard

No, sorry. Even if the Android SDK had the equivalent of .twitter, since input method editors are apps, no third-party keyboard is obligated to do anything different for .twitter than it would do in other scenarios.

User AvatarCommonsWare
Jul 10 at 10:36 AM
3