KeyboardType


The keyboard type to be used in KeyboardOptions.

Note that this input type is honored by keyboard and shows corresponding keyboard but this is not guaranteed. For example, some keyboards may send non-ASCII character even if you set KeyboardType.Ascii.

Summary

Public companion properties

KeyboardType

Forces the keyboard to display Latin characters.

Cmn
KeyboardType

Displays a numeric keypad optimized for date entry, typically containing / or -.

Cmn
KeyboardType

Displays a numeric keypad optimized for entering both dates and times.

Cmn
KeyboardType

Displays a numeric keypad containing a decimal point key (.

Cmn
KeyboardType

Shows a masked numeric keypad containing decimal separators.

Cmn
KeyboardType

Shows a masked numeric keypad containing both decimal separators and signs.

Cmn
KeyboardType

Displays a numeric keypad showing 0-9, decimal separators, and sign keys.

Cmn
KeyboardType

Optimizes the keyboard for typing email addresses.

Cmn
KeyboardType

Optimizes the keyboard for email subject lines.

Cmn
KeyboardType

Optimizes the keyboard for filtering lists or search queries.

Cmn
KeyboardType

Optimizes the keyboard for writing emails or other long-form content.

Cmn
KeyboardType

Displays a numeric keypad with only digits 0-9.

Cmn
KeyboardType

Shows a masked numeric keypad (0-9) for secure PIN entry.

Cmn
KeyboardType

Shows a masked numeric keypad containing positive/negative signs.

Cmn
KeyboardType

Displays a numeric keypad showing 0-9 and a negative/positive sign key (+/-).

Cmn
KeyboardType

Shows a standard masked text-based keyboard layout.

Cmn
KeyboardType

Shows a text-based password layout, but the typed text remains visible (unmasked).

Cmn
KeyboardType

Optimizes the keyboard for entering names, typically capitalizing each word.

Cmn
KeyboardType

Displays a telephone dialer keypad.

Cmn
KeyboardType

Keyboard layout optimized for entering phonetic spellings or pronunciation guides.

Cmn
KeyboardType

Optimizes the keyboard for entering shipping or mailing addresses.

Cmn
KeyboardType

Optimizes the keyboard for sending short instant messages (SMS).

Cmn
KeyboardType

Shows the standard text-based keyboard layout with auto-capitalization and spelling suggestions.

Cmn
KeyboardType

Displays a numeric keypad optimized for time entry, typically containing :.

Cmn
KeyboardType

The keyboard type is not specified.

Cmn
KeyboardType

Optimizes the keyboard for typing web links / URLs.

Cmn

Public functions

open String
Cmn

Public companion properties

Ascii

val AsciiKeyboardType

Forces the keyboard to display Latin characters.

When to use it: Ideal for usernames, system database IDs, or passcodes where you want to restrict input to Latin characters.

Note: Unlike other technical input types (like Uri or Email) which typically disable auto-correct automatically, this type does not. Use androidx.compose.foundation.text.KeyboardOptions.autoCorrectEnabled to disable it if needed.

Date

val DateKeyboardType

Displays a numeric keypad optimized for date entry, typically containing / or -.

DateTime

val DateTimeKeyboardType

Displays a numeric keypad optimized for entering both dates and times.

Decimal

val DecimalKeyboardType

Displays a numeric keypad containing a decimal point key (. or , depending on locale).

When to use it: Entering numbers that require decimal points, such as prices, weights, or coordinates.

DecimalPassword

val DecimalPasswordKeyboardType

Shows a masked numeric keypad containing decimal separators.

DecimalPasswordSigned

val DecimalPasswordSignedKeyboardType

Shows a masked numeric keypad containing both decimal separators and signs.

DecimalSigned

val DecimalSignedKeyboardType

Displays a numeric keypad showing 0-9, decimal separators, and sign keys.

Email

val EmailKeyboardType

Optimizes the keyboard for typing email addresses. Prominently displays @ and . near the spacebar.

When to use it: Login credential lines or registration forms.

Note: IMEs typically disable auto-correct for this type.

EmailSubject

val EmailSubjectKeyboardType

Optimizes the keyboard for email subject lines.

Filter

val FilterKeyboardType

Optimizes the keyboard for filtering lists or search queries.

LongMessage

val LongMessageKeyboardType

Optimizes the keyboard for writing emails or other long-form content.

Number

val NumberKeyboardType

Displays a numeric keypad with only digits 0-9.

When to use it: Perfect for plain positive integers (e.g., specifying item counts, loops, or maximum history buffer settings).

Note: Lacks decimal points and positive/negative (+/-) signs.

NumberPassword

val NumberPasswordKeyboardType

Shows a masked numeric keypad (0-9) for secure PIN entry.

When to use it: Entering masked 4-digit employee authentication PINs, lockscreen passcodes, or secure one-time verification codes (OTPs).

NumberPasswordSigned

val NumberPasswordSignedKeyboardType

Shows a masked numeric keypad containing positive/negative signs.

NumberSigned

val NumberSignedKeyboardType

Displays a numeric keypad showing 0-9 and a negative/positive sign key (+/-).

Password

val PasswordKeyboardType

Shows a standard masked text-based keyboard layout. Masks all typed characters with dots/asterisks for privacy.

When to use it: Secured credentials or login screens.

Note: Disables autocorrect and spelling suggestions, and prevents the keyboard from learning your text.

PasswordVisible

val PasswordVisibleKeyboardType

Shows a text-based password layout, but the typed text remains visible (unmasked).

When to use it: Toggle visibility password text fields. Pair it with standard Password (masked) using an eye-icon button to let the user reveal what they typed.

PersonName

val PersonNameKeyboardType

Optimizes the keyboard for entering names, typically capitalizing each word.

Phone

val PhoneKeyboardType

Displays a telephone dialer keypad. Includes numbers 0-9, and symbols like *, #, and + for phone number formatting.

When to use it: Phone number input fields.

Phonetic

val PhoneticKeyboardType

Keyboard layout optimized for entering phonetic spellings or pronunciation guides.

PostalAddress

val PostalAddressKeyboardType

Optimizes the keyboard for entering shipping or mailing addresses.

ShortMessage

val ShortMessageKeyboardType

Optimizes the keyboard for sending short instant messages (SMS).

Text

val TextKeyboardType

Shows the standard text-based keyboard layout with auto-capitalization and spelling suggestions.

When to use it: For standard text entries (e.g. chat messaging, renaming folders/routines, or general comments).

Time

val TimeKeyboardType

Displays a numeric keypad optimized for time entry, typically containing :.

Unspecified

val UnspecifiedKeyboardType

The keyboard type is not specified.

Uri

val UriKeyboardType

Optimizes the keyboard for typing web links / URLs. Prominently displays / and .com shortcuts next to the spacebar to save keystrokes.

When to use it: Web address and URL entry forms.

Note: IMEs typically disable auto-correct and suggestions for this type.

Public functions

toString

open fun toString(): String