118. Keyboard

Provide information regarding the keyboard.

118.1. Authors

  • Thomas Roelz <tom@suse.de>

  • Maintainer: Jiri Suchomel <jsuchome@suse.cz>

118.2. Summary of Module Globals

List of Global Functions

  • CalledRestore - CalledRestore()

  • CheckKeyboardDuringUpdate - 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

  • Export - AutoYaST interface function: Return the Keyboard configuration as a map.

  • GetExpertValues - GetExpertValues()

  • GetKeyboardForLanguage - GetKeyboardForLanguage()

  • GetKeyboardItems - Return item list of keyboard items, sorted according to current language

  • GetX11KeyData - GetX11KeyData()

  • Import - AutoYaST interface function: Get the Keyboard configuration from a map.

  • Keyboard - Keyboard()

  • MakeProposal - MakeProposal()

  • Modified - was anything modified?

  • Name - Name() Just return the keyboard name, without setting anything.

  • Probe - Probe()

  • Read - Just store inital values - read was done in constructor

  • Restore - Restore the the data from sysconfig.

  • Save - Save the current data into a file to be read after a reboot.

  • Selection - Selection()

  • Set - Set()

  • SetConsole - Set the console keyboard to the given keyboard language.

  • SetExpertValues - SetExpertValues()

  • SetKeyboard - SetKeyboard()

  • SetX11 - Set the X11 keyboard to the given keyboard language.

  • Summary - AutoYaST interface function: Return the summary of Keyboard configuration as a map.

  • get_lang2keyboard - Get the system_language --> keyboard_language conversion map.

  • keymap2yast - Return a map for conversion from keymap to YaST2 keyboard code() Get the map of translated keyboard names.

  • xf86_update - Updates the X11 keyboard settings (using SaX library)

List of Global Variables

118.3. Global Functions

118.3.1. CalledRestore

CalledRestore()

Return value

  • boolean

118.3.2. CheckKeyboardDuringUpdate

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

Function parameters

  • string destdir

Return value

  • void

118.3.3. Export

AutoYaST interface function: Return the Keyboard configuration as a map.

Return value

  • map - with the settings

118.3.4. GetExpertValues

GetExpertValues()

Return value

  • map - with values filled in

118.3.5. GetKeyboardForLanguage

GetKeyboardForLanguage()

Function parameters

  • string sys_language

  • string default_keyboard

Return value

  • string - The keyboard language for this language, e.g. "english-us" or the default value if nothing found.

118.3.6. GetKeyboardItems

Return item list of keyboard items, sorted according to current language

Return value

  • list<term>

118.3.7. GetX11KeyData

GetX11KeyData()

Function parameters

  • string keymap

Return value

  • map - containing the x11 config data

118.3.8. Import

AutoYaST interface function: Get the Keyboard configuration from a map.

Function parameters

  • map settings

Return value

  • boolean - success

118.3.9. Keyboard

Keyboard()

Return value

  • void

See also:

  • Probe()

118.3.10. MakeProposal

MakeProposal()

Function parameters

  • boolean force_reset

  • boolean language_changed

Return value

  • string - user readable description. If force_reset is true reset the module to the keyboard stored in default_kbd.

118.3.11. Modified

was anything modified?

Return value

  • boolean

118.3.12. Name

Name() Just return the keyboard name, without setting anything.

Return value

  • string - user readable description.

118.3.13. Probe

Probe()

Return value

  • void

See also:

  • Keyboard()

118.3.14. Read

Just store inital values - read was done in constructor

Return value

  • boolean

118.3.15. Restore

Restore the the data from sysconfig.

Return value

  • boolean - true - Data could be restored false - Restore not successful

See also:

  • Save()

118.3.16. Save

Save the current data into a file to be read after a reboot.

Function parameters

  • boolean update_x11

Return value

  • void

118.3.17. Selection

Selection()

Return value

  • map<string, string> - 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.

118.3.18. Set

Set()

Function parameters

  • string keyboard

Return value

  • void -

See also:

  • SetX11(), SetConsole()

118.3.19. SetConsole

Set the console keyboard to the given keyboard language.

Function parameters

  • string keyboard

Return value

  • string - The loadkeys command that has been executed to do it. (also stored in Keyboard::ckb_cmd)

118.3.20. SetExpertValues

SetExpertValues()

Function parameters

  • map val

Return value

  • void

118.3.21. SetKeyboard

SetKeyboard()

Function parameters

  • string keyboard

Return value

  • boolean - true - Success. Language set in public data. false - Error. Language not set.

118.3.22. SetX11

Set the X11 keyboard to the given keyboard language.

Function parameters

  • string keyboard

Return value

  • string - The xkbset command that has been executed to do it. (also stored in Keyboard::xkb_cmd)

118.3.23. Summary

AutoYaST interface function: Return the summary of Keyboard configuration as a map.

Return value

  • string - summary string (html)

118.3.24. get_lang2keyboard

Get the system_language --> keyboard_language conversion map.

Return value

  • map - conversion map

See also:

  • get_xkblayout2keyboard()

118.3.25. keymap2yast

Return a map for conversion from keymap to YaST2 keyboard code() Get the map of translated keyboard names.

Return value

  • map<string, string> - 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.

118.3.26. xf86_update

Updates the X11 keyboard settings (using SaX library)

Return value

  • boolean - - success

118.4. Global Variables

118.4.1. expert_on_entry

expert values on start

118.4.2. keyboard_on_entry

keyboard set on start

118.5. Module Requirements

118.5.1. Module Imports

  • Arch
  • AsciiFile
  • Directory
  • HTML
  • Label
  • Language
  • Linuxrc
  • Misc
  • Mode
  • Package
  • ProductFeatures
  • Stage
  • XLibAPI
  • XVersion

118.5.2. Module Includes