98. Keyboard

Provide information regarding the keyboard.

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

  • 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

98.2. Global Functions

98.2.1. CalledRestore

CalledRestore()

Return value

  • boolean

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

98.2.3. Export

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

Return value

  • map - with the settings

98.2.4. GetExpertValues

GetExpertValues()

Return value

  • map - with values filled in

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

98.2.6. GetX11KeyData

GetX11KeyData()

Function parameters

  • string keymap

Return value

  • map - containing the x11 config data

98.2.7. Import

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

Function parameters

  • map settings

Return value

  • boolean - success

98.2.8. Keyboard

Keyboard()

Return value

  • void

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

98.2.10. Modified

was anything modified?

Return value

  • boolean

98.2.11. Name

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

Return value

  • string - user readable description.

98.2.12. Probe

Probe()

Return value

  • void

98.2.13. Read

Just store inital values - read was done in constructor

Return value

  • boolean

98.2.14. Restore

Restore()

Return value

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

98.2.15. Save

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

Function parameters

  • boolean update_x11

Return value

  • void

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

98.2.17. Set

Set()

Function parameters

  • string keyboard

Return value

  • void -

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

98.2.19. SetExpertValues

SetExpertValues()

Function parameters

  • map val

Return value

  • void

98.2.20. SetLanguage

SetLanguage()

Function parameters

  • string keyboard

Return value

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

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

98.2.22. Summary

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

Return value

  • string - summary string (html)

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

98.2.24. xf86_update

Updates the X11 keyboard settings (using SaX library)

Return value

  • boolean - - success

98.3. Global Variables

98.3.1. expert_on_entry

expert values on start

98.3.2. keyboard_on_entry

keyboard set on start

98.4. Module Requirements

98.4.1. Module Imports

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

98.4.2. Module Includes