Unknown YCP Module |
This module has an unstable interface. |
Imports
Global VariablesGlobal Functions
Local Functions |
File: Keyboard.ycp
Module: Keyboard
Summary: Provide information regarding the keyboard.
Authors:
Thomas Roelz
Maintainer: Jiri Suchomel
$Id$
Usage:
------
This module provides the following data for public access via Keyboard::
!!! These are to be used READ_ONLY !!!
Set in the constructor after the first import (only after probing):
kb_model XkbLayout unique_key
Set after having called SetKeyboard( keyboard ).
XkbModel XkbVariant XkbOptions LeftAlt RightAlt ScrollLock RightCtl Apply keymap compose_table current_kbd ckb_cmd xkb_cmd
This module provides the following functions for public access via Keyboard::
Keyboard() - Module constructor. If saved module data exists in continue mode, these are read in. Otherwise Hardware is probed.
MakeProposal() - return user-readable description of keyboard
Probe() - Force new hardware probing and set public data accordingly.
Save() - Save module data to /var/lib/YaST2/Keyboard_data.ycp
Restore() - Load module data from /var/lib/YaST2/Keyboard_data.ycp
SetKeyboard() - Set public data to values corresponding to the given language.
GetKeyboardForLanguage() - Get the keyboard language for a given language code.
Set() - Set the keyboard to the given keyboard language. SetConsole() - Set the console keyboard to the given keyboard language.
SetX11() - Set the X11 keyboard to the given keyboard language.
Selection() - Get map of translated keyboards to be displayed in the GUI.
keyboard set on start
expert values on start
GetKbdSysconfig()
Return a map for conversion from keymap to YaST2 keyboard code() Get the map of translated keyboard names.
- Return value:
-
of $[ keyboard_code : keyboard_name, ...] for all known keyboards. 'keyboard_code' is used internally in Set and Get functions. 'keyboard_name' is a user-readable string. Uses Language::language for translation.
GetX11KeyData()
Get the keyboard info for X11 for the given keymap
- Parameters:
-
keymap
- Return value:
-
containing the x11 config data
Return human readable (and translated) name of the given keyboard map
- Parameters:
-
kbd keyboard map
GetExpertValues()
Return the values for the various expert settings in a map
- Return value:
-
with values filled in
Get the system_language --> keyboard_language conversion map.
- Return value:
-
conversion map
GetKeyboardForLanguage()
Get the keyboard language for the given system language.
- Parameters:
-
sys_language default_keyboard
- Return value:
-
The keyboard language for this language, e.g. "english-us" or the default value if nothing found.
run X11 configuration after inital boot
SetKeyboard()
Set language specific module data to reflect the given keyboard layout.
- Parameters:
-
keyboard
- Return value:
-
true - Success. Language set in public data. false - Error. Language not set.
Restore the the data from sysconfig.
- Return value:
-
true - Data could be restored false - Restore not successful
- See
-
Save()
XkblayoutToKeyboard()
Convert X11 keyboard layout name to yast2 name for keyboard description. e.g. "de" --> "german"
- Parameters:
-
x11_layout
- Return value:
-
yast2 name for keyboard description
Probe keyboard and set local module data.
Probe()
Allow for intentional probing by applications.
- See
-
Keyboard()
Keyboard()
The module constructor. Sets the proprietary module data defined globally for public access. This is done only once (and automatically) when the module is loaded for the first time.
- See
-
Probe()
Just store inital values - read was done in constructor
was anything modified?
Save the current data into a file to be read after a reboot.
Name() Just return the keyboard name, without setting anything.
- Return value:
-
user readable description.
Set the console keyboard to the given keyboard language.
- Parameters:
-
keyboard
- Return value:
-
The loadkeys command that has been executed to do it. (also stored in Keyboard::ckb_cmd)
Set the X11 keyboard to the given keyboard language.
- Parameters:
-
keyboard
- Return value:
-
The xkbset command that has been executed to do it. (also stored in Keyboard::xkb_cmd)
Set()
Set the keyboard to the given keyboard language.
- Parameters:
-
keyboard
- Return value:
-
MakeProposal()
Return proposal string and set system keyboard.
- Parameters:
-
force_reset language_changed
- Return value:
-
user readable description. If force_reset is true reset the module to the keyboard stored in default_kbd.
CalledRestore()
Return if the kbd values have already been read from /etc/sysconfig/keyboard
Selection()
Get the map of translated keyboard names.
- Return value:
-
of $[ keyboard_code : keyboard_name, ...] for all known keyboards. 'keyboard_code' is used internally in Set and Get functions. 'keyboard_name' is a user-readable string.
Return item list of keyboard items, sorted according to current language
SetExpertValues()
Set the values of the various expert setting
- Parameters:
-
val map with new values of expert settings
Special function for update mode only. Checks for the keyboard layout on the system which should be updated and if it differs from current one, opens a popup with the offer to change the layout. See discussion in bug #71069
- Parameters:
-
destdir path to the mounted system to update (e.g. "/mnt")
AutoYaST interface function: Get the Keyboard configuration from a map.
- Parameters:
-
settings imported map
- Return value:
-
success
AutoYaST interface function: Return the Keyboard configuration as a map.
- Return value:
-
with the settings
AutoYaST interface function: Return the summary of Keyboard configuration as a map.
- Return value:
-
summary string (html)