Added in API level 3
Deprecated in API level 29

Keyboard.Key


public static class Keyboard.Key
extends Object

java.lang.Object
   ↳ android.inputmethodservice.Keyboard.Key


Class for describing the position and characteristics of a single key in the keyboard.

Summary

XML attributes

android:codes This is deprecated. Copy this definition into your own application project.

May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character;

May be an integer value, such as "100". 

android:horizontalGap This is deprecated. Copy this definition into your own application project.

May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

May be a fractional value, which is a floating point number appended with either % or %p, such as "14.5%". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. 

android:iconPreview This is deprecated. Copy this definition into your own application project.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". 

android:isModifier This is deprecated. Copy this definition into your own application project.

May be a boolean value, such as "true" or "false". 

android:isRepeatable This is deprecated. Copy this definition into your own application project.

May be a boolean value, such as "true" or "false". 

android:isSticky This is deprecated. Copy this definition into your own application project.

May be a boolean value, such as "true" or "false". 

android:keyEdgeFlags This is deprecated. Copy this definition into your own application project.

Must be one or more (separated by '|') of the following constant values.

ConstantValueDescription
left1Key is anchored to the left of the keyboard.Copy this definition into your own application project.
right