keyboard

package
v0.0.0-...-9957a5b Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package keyboard implements the Keyboard gRPC service.

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedFiles embed.FS

EmbeddedFiles is the embedded keyboard configuration file.

Functions

This section is empty.

Types

type Option

type Option func(*Service) error

Option is a functional option to set the DBus objects in tests.

type Service

type Service struct {
	pb.UnimplementedKeyboardServiceServer
	// contains filtered or unexported fields
}

Service is the implementation of the Keyboard service.

func New

func New(conn *dbus.Conn, opts ...Option) (*Service, error)

New returns a new instance of the Keyboard service.

func (*Service) GetKeyboard

func (s *Service) GetKeyboard(ctx context.Context, req *emptypb.Empty) (*pb.GetKeyboardResponse, error)

GetKeyboard returns the current keyboard layout and available layouts.

func (*Service) SetInputSource

func (s *Service) SetInputSource(ctx context.Context, req *pb.SetInputSourceRequest) (*emptypb.Empty, error)

SetInputSource sets the input source for the current user via gsettings.

func (*Service) SetKeyboard

func (s *Service) SetKeyboard(ctx context.Context, req *pb.SetKeyboardRequest) (*emptypb.Empty, error)

SetKeyboard sets the keyboard layout for the current user via DBus.

Jump to

Keyboard shortcuts

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