Sets the keyboard focus owner within an editor or globally.
If #f is provided as the new owner, then the local focus is moved to the editor itself. Otherwise, the local focus is moved to the specified snip.
The domain of focus-setting is one of:
The focus state of an editor can be changed by by the system, and such changes do not go through this method; use on-focus to monitor focus changes.
See also get-focus-snip .
Attempts to give the keyboard focus to snip. If snip is #f, then the caret is taken away from any snip in the editor that currently has the caret and restored to this editor.
If the keyboard focus is moved to snip and the editor has the real keyboard focus, the own-caret method of the snip will be called.