App:Library:LVGL:docs:Widgets:Keyboard (lv keyboard)
https://docs.lvgl.io/8.2/widgets/extra/keyboard.html
Keyboard (lv_keyboard)
Overview
英文 | 自動翻訳 |
---|---|
The Keyboard object is a special Button matrix with predefined keymaps and other features to realize a virtual keyboard to write texts into a Text area. |
Keyboardオブジェクトは、Textエリアにテキストを書き込むための仮想キーボードを実現するために、あらかじめ定義されたキーマップとその他の機能を持つ特別なButtonマトリックスです。 |
Parts and Styles
英文 | 自動翻訳 |
---|---|
Similarly to Button matrices Keyboards consist of 2 part:
|
ボタン行列と同様に、キーボードも2つの部分から構成される。
|
Usage
Modes
英文 | 自動翻訳 |
---|---|
The Keyboards have the following modes:
To set the mode manually, use |
Keyboardsには以下のモードがあります。
モードを手動で設定するには、 |
Assign Text area
英文 | 自動翻訳 |
---|---|
You can assign a Text area to the Keyboard to automatically put the clicked characters there. To assign the text area, use |
キーボードにテキストエリアを割り当てて、クリックした文字を自動的にそこに配置することができます。テキストエリアを割り当てるには、lv_keyboard_set_textarea(kb, ta) を使用します。
|
Key Popovers
英文 | 自動翻訳 |
---|---|
To enable key popovers on press, like on common Android and iOS keyboards, use
If you use a custom keymap, set the
To account for this, reserve extra free space on top of the keyboard or ensure that the keyboard is added after any widgets adjacent to its top boundary so that the popovers can draw over those. The popovers currently are merely a visual effect and don't allow selecting additional characters such as accents yet. |
キーボードにテキストエリアを割り当てて、クリックした文字を自動的にそこに配置することができます。テキストエリアを割り当てるには、lv_keyboard_seを使用します。一般的なAndroidやiOSのキーボードのように、押したときにキーのポップオーバーを有効にするには、lv_keyboard_set_popovers(kb, true)を使用します。
カスタムのキーマップを使用する場合は、ポップオーバーを表示したいすべてのキーに
このため、キーボードの上に空きスペースを確保するか、キーボードをウィジェット上部の境界線に隣接するウィジェットの後に追加して、ポップオーバーがそれらの上に描画されるようにします。
|
New Keymap
英文 | 自動翻訳 |
---|---|
You can specify a new map (layout) for the keyboard with Learn more about the Button matrix object. Keep in mind that using following keywords will have the same effect as with the original map:
|
キーボードの新しいマップ(レイアウト)は、 lv_keyboard_set_map(kb, map) と lv_keyboard_set_ctrl_map(kb, ctrl_map) . で指定することができます。
ボタンマトリックスオブジェクトについてはこちらをご覧ください。 以下のキーワードを使用しても、オリジナルのマップと同じ効果が得られることに留意してください。
|
Events
英文 | 自動翻訳 |
---|---|
You can remove it and replace it with a custom event handler if you wish. Note In 8.0 and newer, adding an event handler to the keyboard does not remove the default event handler. This behavior differs from v7, where adding an event handler would always replace the previous one. Learn more about Events. |
8.0以降では、キーボードにイベントハンドラを追加しても、デフォルトイベントハンドラは削除されません。 この動作は、イベントハンドラを追加すると常に前のイベントハンドラを置き換えるv7とは異なります。
|
Keys
英文 | 自動翻訳 |
---|---|
|
|
Examples
英文 | 自動翻訳 |
---|---|
Keyboard with text area |
API
英文 | 自動翻訳 |
---|---|
Typedefs typedef uint8_t lv_keyboard_mode_t Enums enum [anonymous]
Functions lv_obj_t *lv_keyboard_create(lv_obj_t *parent)
void lv_keyboard_set_textarea(lv_obj_t *kb, lv_obj_t *ta)
void lv_keyboard_set_mode(lv_obj_t *kb, lv_keyboard_mode_t mode)
void lv_keyboard_set_popovers(lv_obj_t *kb, bool en)
void lv_keyboard_set_map(lv_obj_t *kb, lv_keyboard_mode_t mode, const char *map[], const lv_btnmatrix_ctrl_t ctrl_map[])
lv_obj_t *lv_keyboard_get_textarea(const lv_obj_t *kb)
lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *kb)
bool lv_btnmatrix_get_popovers(const lv_obj_t *obj)
static inline const char **lv_keyboard_get_map_array(const lv_obj_t *kb)
static inline uint16_t lv_keyboard_get_selected_btn(const lv_obj_t *obj)
static inline const char *lv_keyboard_get_btn_text(const lv_obj_t *obj, uint16_t btn_id)
void lv_keyboard_def_event_cb(lv_event_t *e)
Variables const lv_obj_class_t lv_keyboard_class struct lv_keyboard_t
|
Typedefs
typedef uint8_t lv_keyboard_mode_t Enums enum [anonymous]
Functions lv_obj_t *lv_keyboard_create(lv_obj_t *parent)
void lv_keyboard_set_textarea(lv_obj_t *kb, lv_obj_t *ta)
void lv_keyboard_set_mode(lv_obj_t *kb, lv_keyboard_mode_t mode)
void lv_keyboard_set_popovers(lv_obj_t *kb, bool en)
void lv_keyboard_set_map(lv_obj_t *kb, lv_keyboard_mode_t mode, const char *map[], const lv_btnmatrix_ctrl_t ctrl_map[])
lv_obj_t *lv_keyboard_get_textarea(const lv_obj_t *kb)
lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *kb)
bool lv_btnmatrix_get_popovers(const lv_obj_t *obj)
static inline const char **lv_keyboard_get_map_array(const lv_obj_t *kb)
static inline uint16_t lv_keyboard_get_selected_btn(const lv_obj_t *obj)
static inline const char *lv_keyboard_get_btn_text(const lv_obj_t *obj, uint16_t btn_id)
void lv_keyboard_def_event_cb(lv_event_t *e)
Variables const lv_obj_class_t lv_keyboard_class struct lv_keyboard_t
|