keyboard

package
v0.0.0-...-ffb386f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultKeyboard is the default keyboard string
	// This is what is set in os-core
	DefaultKeyboard = "us"

	// RequiredBundle the bundle needed to set keyboard other than the default
	RequiredBundle = "kbd"
)

Variables

This section is empty.

Functions

func Apply

func Apply(k *Keymap) error

Apply apply the k keymap to the running system

func IsValidKeyboard

func IsValidKeyboard(k *Keymap) bool

IsValidKeyboard verifies if the given keyboard is valid

func SetTargetKeyboard

func SetTargetKeyboard(rootDir string, keyboard string) error

SetTargetKeyboard creates a keyboard vconsole.conf on the target

Types

type Keymap

type Keymap struct {
	Code string
	// contains filtered or unexported fields
}

Keymap represents a system' keymap

func LoadKeymaps

func LoadKeymaps() ([]*Keymap, error)

LoadKeymaps loads the system's available keymaps

func (*Keymap) Equals

func (k *Keymap) Equals(comp *Keymap) bool

Equals compares tow Keymap instances

func (*Keymap) IsUserDefined

func (k *Keymap) IsUserDefined() bool

IsUserDefined returns true if the configuration was interactively defined by the user

func (*Keymap) MarshalYAML

func (k *Keymap) MarshalYAML() (interface{}, error)

MarshalYAML marshals Keymap into YAML format

func (*Keymap) UnmarshalYAML

func (k *Keymap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals Keymap from YAML format

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL