Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 17.0Version 16.0 (current version)Version 15.0Version 14.0Version 13.0 (home page)Version 12.0 (home page)Version 11.0 (home page)Version 10.0 (home page)Version 2.0 (home page)Version 1.0 (home page)

On this page

restorePosition


Summary

Move OSK back to default position, floating under active input element, for desktop OSK.

Syntax

keyman.osk.restorePosition(keepDefaultPosition);

Parameters

keepDefaultPosition
boolean optional
If true does not reset the default left, top set by setRect().
If false or omitted, resets the default left, top as well.

Return Value

undefined

Description

This is the equivalent of pressing the pin in the title bar of the desktop OSK. The user may move the OSK, after which point the OSK stays where the user has placed it. Similarly, calling setPos() will fix the position of the OSK. Calling restorePosition() resets the position of the OSK and re-attaches it to the bottom of the active input element.

Note that if the user clicks the pin it does not reset the default left, top as set by setRect().

History

  • Published as public API in 14.0.272