mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-16 05:39:24 +00:00
Deprecate the following obsolete functions and properties: * `keyman.helpURL` * `keyman.util.rgba` * `keyman.util.toFloat` * `keyman.util.toNumber` * `keyman.util.toNzString` Use correct language for code blocks in Keyman Engine for Web documentation. Test-bot: skip
35 lines
1,007 B
Markdown
35 lines
1,007 B
Markdown
---
|
|
title: saveFocus (KSF)
|
|
---
|
|
|
|
## Summary
|
|
|
|
Save focus: Temporarily saves keyboard processing data for the currently-focused control.
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
keyman.interface.saveFocus()
|
|
```
|
|
|
|
or
|
|
|
|
```js
|
|
KeymanWeb.KSF() // Shorthand
|
|
```
|
|
|
|
### Parameters
|
|
|
|
None.
|
|
|
|
### Return Value
|
|
|
|
`undefined`
|
|
|
|
## Description
|
|
|
|
Use this function to temporarily preserve all keyboard processing information during a single change-of-focus event.
|
|
|
|
This function is designed to allow custom UI elements, custom OSK displays (as for the [EuroLatin keyboard](https://keymanweb.com/#aae,Keyboard_sil_euro_latin)), or keyboards with picker-style functionality (such as the [Japanese keyboard](https://keymanweb.com/#jpn,Keyboard_japanese)) to operate without losing the current input state due to loss of focus for the active control.
|
|
|
|
A good example of when to call this function would be for `onmousedown` events for visual elements not intended to change the element of focus within KeymanWeb. It is safe for use outside of keyboard code.
|