Keyboard Types & IME Actions
Show the right keyboard and submit button.
Keyboard Types & IME Actions is a free Jetpack Compose Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Jetpack Compose Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Right Keyboard Matters
Asking for a phone number? Show a number pad, not letters. The right keyboard makes typing fast and error-free. 📱
keyboardOptions
You shape the keyboard through keyboardOptions. It lets you pick the key layout and the action button shown on it.
TextField(
value = phone,
onValueChange = { phone = it },
keyboardOptions = KeyboardOptions(/* ... */)
)Pick a keyboardType
Set keyboardType to match the data: Number for digits, Email for addresses, Phone for dialing.
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Email
)Common Keyboard Types
Handy choices include Text, Number, Phone, Email, Decimal, and Password. Each one tweaks the keys to fit the input.
Hide Password Characters
For secrets, pair the Password type with a visualTransformation so each character shows as a dot. 🔒
visualTransformation = PasswordVisualTransformation()IME Actions
The imeAction sets the keyboard's main button. Choose Next to move to the following field or Done to finish a form.
keyboardOptions = KeyboardOptions(
imeAction = ImeAction.Next
)Common IME Actions
Frequent actions are Next, Done, Search, Send, and Go. They tell the user what tapping the button will do.
React with keyboardActions
Respond to that button using keyboardActions. Run a search, submit the form, or jump focus to the next field.
keyboardActions = KeyboardActions(
onDone = { submitForm() }
)Move Focus on Next
For multi-field forms, use the FocusManager to move to the next input when the user taps Next.
keyboardActions = KeyboardActions(
onNext = { focusManager.moveFocus(FocusDirection.Down) }
)Type and Action Work Together
Set the keyboardType and imeAction together for each field. The result feels polished and effortless to fill in.
Small Touches, Big Polish
Matching the keyboard and its action to each field is a tiny effort that gives your forms a truly professional feel.
Quick Check
Which option controls the action button shown on the keyboard?
Recap
You tuned the keyboard: keyboardType picks the keys, imeAction labels the button, and keyboardActions responds to it. Smooth typing all around. 🎯
Frequently asked questions
Is the “Keyboard Types & IME Actions” lesson free?
Yes — the full text of “Keyboard Types & IME Actions” is free to read here on the web, and the Jetpack Compose Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Jetpack Compose Academy course, upgrade to CoddyKit PRO.
What will I learn in “Keyboard Types & IME Actions”?
Show the right keyboard and submit button. You practise Jetpack Compose Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Jetpack Compose Academy?
No prior experience is required. Jetpack Compose Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Keyboard Types & IME Actions” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Jetpack Compose Academy lesson?
Yes. Every Jetpack Compose Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- TextField & OutlinedTextField
- Labels, Placeholders & Leading Icons
- Keyboard Types & IME Actions
- Inline Validation & Error States