115. Keyboard

Provide information regarding the keyboard.

115.1. 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()

  • 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()

  • SetLanguage - SetLanguage()

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

  • Summary - AutoYaST interface function: Return the summary of Keyboard configuration as a 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

115.2. Global Functions

115.2.1. CalledRestore

CalledRestore()

Return value

  • boolean

115.2.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

115.2.3. Export

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

Return value

  • map - with the settings

115.2.4. GetExpertValues

GetExpertValues()

Return value

  • map - with values filled in

115.2.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.

115.2.6. GetKeyboardItems

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

Return value

  • list<term>

115.2.7. GetX11KeyData

GetX11KeyData()

Function parameters

  • string keymap

Return value

  • map - containing the x11 config data

115.2.8. Import

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

Function parameters

  • map settings

Return value

  • boolean - success

115.2.9. Keyboard

Keyboard()

Return value

  • void

115.2.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.

115.2.11. Modified

was anything modified?

Return value

  • boolean

115.2.12. Name

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

Return value

  • string - user readable description.

115.2.13. Probe

Probe()

Return value

  • void

115.2.14. Read

Just store inital values - read was done in constructor

Return value

  • boolean

115.2.15. Restore

Restore()

Return value

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

115.2.16. Save

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

Function parameters

  • boolean update_x11

Return value

  • void

115.2.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.

115.2.18. Set

Set()

Function parameters

  • string keyboard

Return value

  • void -

115.2.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)

115.2.20. SetExpertValues

SetExpertValues()

Function parameters

  • map val

Return value

  • void

115.2.21. SetLanguage

SetLanguage()

Function parameters

  • string keyboard

Return value

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

115.2.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)

115.2.23. Summary

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

Return value

  • string - summary string (html)

115.2.24. 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.

115.2.25. xf86_update

Updates the X11 keyboard settings (using SaX library)

Return value

  • boolean - - success

115.3. Global Variables

115.3.1. expert_on_entry

expert values on start

115.3.2. keyboard_on_entry

keyboard set on start

115.4. Module Requirements

115.4.1. Module Imports

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

115.4.2. Module Includes