keymapv1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnekeymapService_ImportKeymap_FullMethodName = "/keymap.v1.OnekeymapService/ImportKeymap"
	OnekeymapService_ExportKeymap_FullMethodName = "/keymap.v1.OnekeymapService/ExportKeymap"
	OnekeymapService_ConfigDetect_FullMethodName = "/keymap.v1.OnekeymapService/ConfigDetect"
	OnekeymapService_GetKeymap_FullMethodName    = "/keymap.v1.OnekeymapService/GetKeymap"
	OnekeymapService_SaveKeymap_FullMethodName   = "/keymap.v1.OnekeymapService/SaveKeymap"
)

Variables

View Source
var (
	EditorType_name = map[int32]string{
		0:  "EDITOR_TYPE_UNSPECIFIED",
		1:  "VSCODE",
		5:  "WINDSURF",
		6:  "WINDSURF_NEXT",
		7:  "CURSOR",
		2:  "ZED",
		8:  "INTELLIJ",
		9:  "INTELLIJ_COMMUNITY",
		10: "PYCHARM",
		11: "WEBSTORM",
		12: "CLION",
		13: "PHPSTORM",
		14: "RUBYMINE",
		15: "GOLAND",
		16: "RUSTROVER",
		3:  "HELIX",
		4:  "VIM",
	}
	EditorType_value = map[string]int32{
		"EDITOR_TYPE_UNSPECIFIED": 0,
		"VSCODE":                  1,
		"WINDSURF":                5,
		"WINDSURF_NEXT":           6,
		"CURSOR":                  7,
		"ZED":                     2,
		"INTELLIJ":                8,
		"INTELLIJ_COMMUNITY":      9,
		"PYCHARM":                 10,
		"WEBSTORM":                11,
		"CLION":                   12,
		"PHPSTORM":                13,
		"RUBYMINE":                14,
		"GOLAND":                  15,
		"RUSTROVER":               16,
		"HELIX":                   3,
		"VIM":                     4,
	}
)

Enum value maps for EditorType.

View Source
var (
	KeyModifier_name = map[int32]string{
		0: "KEY_MODIFIER_UNSPECIFIED",
		1: "KEY_MODIFIER_SHIFT",
		2: "KEY_MODIFIER_CTRL",
		3: "KEY_MODIFIER_ALT",
		4: "KEY_MODIFIER_META",
	}
	KeyModifier_value = map[string]int32{
		"KEY_MODIFIER_UNSPECIFIED": 0,
		"KEY_MODIFIER_SHIFT":       1,
		"KEY_MODIFIER_CTRL":        2,
		"KEY_MODIFIER_ALT":         3,
		"KEY_MODIFIER_META":        4,
	}
)

Enum value maps for KeyModifier.

View Source
var (
	KeyCode_name = map[int32]string{}/* 116 elements not displayed */

	KeyCode_value = map[string]int32{}/* 116 elements not displayed */

)

Enum value maps for KeyCode.

View Source
var (
	ExportKeymapRequest_DiffType_name = map[int32]string{
		0: "DIFF_TYPE_UNSPECIFIED",
		1: "ASCII_DIFF",
		2: "UNIFIED_DIFF",
	}
	ExportKeymapRequest_DiffType_value = map[string]int32{
		"DIFF_TYPE_UNSPECIFIED": 0,
		"ASCII_DIFF":            1,
		"UNIFIED_DIFF":          2,
	}
)

Enum value maps for ExportKeymapRequest_DiffType.

View Source
var (
	Platform_name = map[int32]string{
		0: "PLATFORM_UNSPECIFIED",
		1: "MACOS",
		2: "WINDOWS",
		3: "LINUX",
	}
	Platform_value = map[string]int32{
		"PLATFORM_UNSPECIFIED": 0,
		"MACOS":                1,
		"WINDOWS":              2,
		"LINUX":                3,
	}
)

Enum value maps for Platform.

View Source
var File_keymap_v1_editor_proto protoreflect.FileDescriptor
View Source
var File_keymap_v1_keycode_proto protoreflect.FileDescriptor
View Source
var File_keymap_v1_keymap_proto protoreflect.FileDescriptor
View Source
var File_keymap_v1_onekeymap_service_proto protoreflect.FileDescriptor
View Source
var File_keymap_v1_platform_proto protoreflect.FileDescriptor
View Source
var File_keymap_v1_validation_proto protoreflect.FileDescriptor
View Source
var OnekeymapService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keymap.v1.OnekeymapService",
	HandlerType: (*OnekeymapServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ImportKeymap",
			Handler:    _OnekeymapService_ImportKeymap_Handler,
		},
		{
			MethodName: "ExportKeymap",
			Handler:    _OnekeymapService_ExportKeymap_Handler,
		},
		{
			MethodName: "ConfigDetect",
			Handler:    _OnekeymapService_ConfigDetect_Handler,
		},
		{
			MethodName: "GetKeymap",
			Handler:    _OnekeymapService_GetKeymap_Handler,
		},
		{
			MethodName: "SaveKeymap",
			Handler:    _OnekeymapService_SaveKeymap_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keymap/v1/onekeymap_service.proto",
}

OnekeymapService_ServiceDesc is the grpc.ServiceDesc for OnekeymapService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOnekeymapServiceServer

func RegisterOnekeymapServiceServer(s grpc.ServiceRegistrar, srv OnekeymapServiceServer)

Types

type Action

type Action struct {

	// Action name should follow "keymap/{keymap}/action/{name}" pattern, e.g. keymap/1/action/actions.editor.copy
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The key bindings that trigger the action.
	// e.g. ctrl+s, ctrl+shift+s
	Bindings []*KeybindingReadable `protobuf:"bytes,2,rep,name=bindings,proto3" json:"bindings,omitempty"`
	// The action config
	ActionConfig *ActionConfig `protobuf:"bytes,3,opt,name=action_config,json=actionConfig,proto3" json:"action_config,omitempty"`
	// Optional, user-provided comment for this keymap.
	Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`
	// contains filtered or unexported fields
}

Action represents a single mapping from multiple key bindings to a logical action.

func (*Action) Descriptor deprecated

func (*Action) Descriptor() ([]byte, []int)

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetActionConfig

func (x *Action) GetActionConfig() *ActionConfig

func (*Action) GetBindings

func (x *Action) GetBindings() []*KeybindingReadable

func (*Action) GetComment

func (x *Action) GetComment() string

func (*Action) GetName

func (x *Action) GetName() string

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

func (x *Action) ProtoReflect() protoreflect.Message

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

type ActionConfig

type ActionConfig struct {

	// name of the action
	DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// description of the action
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// category of the action
	// e.g. "Editor", "Terminal"
	// Has subcategories if category has ".", e.g. "Editor.Clipboard"
	Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
	// editor support information for this action
	EditorSupport []*EditorSupport `protobuf:"bytes,4,rep,name=editor_support,json=editorSupport,proto3" json:"editor_support,omitempty"`
	// contains filtered or unexported fields
}

ActionConfig represents the configuration of an action.

func (*ActionConfig) Descriptor deprecated

func (*ActionConfig) Descriptor() ([]byte, []int)

Deprecated: Use ActionConfig.ProtoReflect.Descriptor instead.

func (*ActionConfig) GetCategory

func (x *ActionConfig) GetCategory() string

func (*ActionConfig) GetDescription

func (x *ActionConfig) GetDescription() string

func (*ActionConfig) GetDisplayName

func (x *ActionConfig) GetDisplayName() string

func (*ActionConfig) GetEditorSupport added in v0.3.1

func (x *ActionConfig) GetEditorSupport() []*EditorSupport

func (*ActionConfig) ProtoMessage

func (*ActionConfig) ProtoMessage()

func (*ActionConfig) ProtoReflect

func (x *ActionConfig) ProtoReflect() protoreflect.Message

func (*ActionConfig) Reset

func (x *ActionConfig) Reset()

func (*ActionConfig) String

func (x *ActionConfig) String() string

type ActionDiff

type ActionDiff struct {

	// The keymap before the change.
	Origin *Action `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
	// The keymap after the change.
	Updated *Action `protobuf:"bytes,2,opt,name=updated,proto3" json:"updated,omitempty"`
	// contains filtered or unexported fields
}

ActionDiff represents the diff of a keymap.

func (*ActionDiff) Descriptor deprecated

func (*ActionDiff) Descriptor() ([]byte, []int)

Deprecated: Use ActionDiff.ProtoReflect.Descriptor instead.

func (*ActionDiff) GetOrigin

func (x *ActionDiff) GetOrigin() *Action

func (*ActionDiff) GetUpdated

func (x *ActionDiff) GetUpdated() *Action

func (*ActionDiff) ProtoMessage

func (*ActionDiff) ProtoMessage()

func (*ActionDiff) ProtoReflect

func (x *ActionDiff) ProtoReflect() protoreflect.Message

func (*ActionDiff) Reset

func (x *ActionDiff) Reset()

func (*ActionDiff) String

func (x *ActionDiff) String() string

type ConfigDetectRequest

type ConfigDetectRequest struct {

	// The editor type.
	EditorType EditorType `protobuf:"varint,1,opt,name=editor_type,json=editorType,proto3,enum=keymap.v1.EditorType" json:"editor_type,omitempty"`
	// contains filtered or unexported fields
}

ConfigDetectRequest is the request message for ConfigDetect.

func (*ConfigDetectRequest) Descriptor deprecated

func (*ConfigDetectRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigDetectRequest.ProtoReflect.Descriptor instead.

func (*ConfigDetectRequest) GetEditorType

func (x *ConfigDetectRequest) GetEditorType() EditorType

func (*ConfigDetectRequest) ProtoMessage

func (*ConfigDetectRequest) ProtoMessage()

func (*ConfigDetectRequest) ProtoReflect

func (x *ConfigDetectRequest) ProtoReflect() protoreflect.Message

func (*ConfigDetectRequest) Reset

func (x *ConfigDetectRequest) Reset()

func (*ConfigDetectRequest) String

func (x *ConfigDetectRequest) String() string

type ConfigDetectResponse

type ConfigDetectResponse struct {

	// The default config paths.
	Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
	// contains filtered or unexported fields
}

ConfigDetectResponse is the response message for ConfigDetect.

func (*ConfigDetectResponse) Descriptor deprecated

func (*ConfigDetectResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConfigDetectResponse.ProtoReflect.Descriptor instead.

func (*ConfigDetectResponse) GetPaths

func (x *ConfigDetectResponse) GetPaths() []string

func (*ConfigDetectResponse) ProtoMessage

func (*ConfigDetectResponse) ProtoMessage()

func (*ConfigDetectResponse) ProtoReflect

func (x *ConfigDetectResponse) ProtoReflect() protoreflect.Message

func (*ConfigDetectResponse) Reset

func (x *ConfigDetectResponse) Reset()

func (*ConfigDetectResponse) String

func (x *ConfigDetectResponse) String() string

type DanglingAction

type DanglingAction struct {

	// The action that is dangling.
	Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// The keybinding that is dangling.
	Keybinding string `protobuf:"bytes,2,opt,name=keybinding,proto3" json:"keybinding,omitempty"`
	// The suggestion for the dangling action.
	Suggestion string `protobuf:"bytes,3,opt,name=suggestion,proto3" json:"suggestion,omitempty"`
	// contains filtered or unexported fields
}

DanglingAction is a dangling action detected during validation.

func (*DanglingAction) Descriptor deprecated

func (*DanglingAction) Descriptor() ([]byte, []int)

Deprecated: Use DanglingAction.ProtoReflect.Descriptor instead.

func (*DanglingAction) GetAction

func (x *DanglingAction) GetAction() string

func (*DanglingAction) GetKeybinding

func (x *DanglingAction) GetKeybinding() string

func (*DanglingAction) GetSuggestion

func (x *DanglingAction) GetSuggestion() string

func (*DanglingAction) ProtoMessage

func (*DanglingAction) ProtoMessage()

func (*DanglingAction) ProtoReflect

func (x *DanglingAction) ProtoReflect() protoreflect.Message

func (*DanglingAction) Reset

func (x *DanglingAction) Reset()

func (*DanglingAction) String

func (x *DanglingAction) String() string

type DuplicateMapping

type DuplicateMapping struct {

	// The action that has duplicate mappings.
	Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// The keybinding that is duplicated.
	Keybinding string `protobuf:"bytes,2,opt,name=keybinding,proto3" json:"keybinding,omitempty"`
	// A message describing the issue.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

DuplicateMapping is a duplicate mapping detected during validation.

func (*DuplicateMapping) Descriptor deprecated

func (*DuplicateMapping) Descriptor() ([]byte, []int)

Deprecated: Use DuplicateMapping.ProtoReflect.Descriptor instead.

func (*DuplicateMapping) GetAction

func (x *DuplicateMapping) GetAction() string

func (*DuplicateMapping) GetKeybinding

func (x *DuplicateMapping) GetKeybinding() string

func (*DuplicateMapping) GetMessage

func (x *DuplicateMapping) GetMessage() string

func (*DuplicateMapping) ProtoMessage

func (*DuplicateMapping) ProtoMessage()

func (*DuplicateMapping) ProtoReflect

func (x *DuplicateMapping) ProtoReflect() protoreflect.Message

func (*DuplicateMapping) Reset

func (x *DuplicateMapping) Reset()

func (*DuplicateMapping) String

func (x *DuplicateMapping) String() string

type EditorSupport added in v0.3.1

type EditorSupport struct {

	// The editor type
	EditorType EditorType `protobuf:"varint,1,opt,name=editor_type,json=editorType,proto3,enum=keymap.v1.EditorType" json:"editor_type,omitempty"`
	// Whether this action is supported by the editor
	Supported bool `protobuf:"varint,2,opt,name=supported,proto3" json:"supported,omitempty"`
	// Special note of why not supported or supportness
	Note string `protobuf:"bytes,3,opt,name=note,proto3" json:"note,omitempty"`
	// contains filtered or unexported fields
}

EditorSupport represents whether an action is supported by a specific editor.

func (*EditorSupport) Descriptor deprecated added in v0.3.1

func (*EditorSupport) Descriptor() ([]byte, []int)

Deprecated: Use EditorSupport.ProtoReflect.Descriptor instead.

func (*EditorSupport) GetEditorType added in v0.3.1

func (x *EditorSupport) GetEditorType() EditorType

func (*EditorSupport) GetNote added in v0.7.0

func (x *EditorSupport) GetNote() string

func (*EditorSupport) GetSupported added in v0.3.1

func (x *EditorSupport) GetSupported() bool

func (*EditorSupport) ProtoMessage added in v0.3.1

func (*EditorSupport) ProtoMessage()

func (*EditorSupport) ProtoReflect added in v0.3.1

func (x *EditorSupport) ProtoReflect() protoreflect.Message

func (*EditorSupport) Reset added in v0.3.1

func (x *EditorSupport) Reset()

func (*EditorSupport) String added in v0.3.1

func (x *EditorSupport) String() string

type EditorType

type EditorType int32

EditorType represents the type of editor.

const (
	// Unspecified
	EditorType_EDITOR_TYPE_UNSPECIFIED EditorType = 0
	// Visual Studio Code
	EditorType_VSCODE EditorType = 1
	// WindSurf
	EditorType_WINDSURF EditorType = 5
	// WindSurf preview
	EditorType_WINDSURF_NEXT EditorType = 6
	// Cursor
	EditorType_CURSOR EditorType = 7
	// Zed
	EditorType_ZED EditorType = 2
	// IntelliJ IDEA Ultimate
	EditorType_INTELLIJ EditorType = 8
	// IntelliJ IDEA Community
	EditorType_INTELLIJ_COMMUNITY EditorType = 9
	// PyCharm
	EditorType_PYCHARM EditorType = 10
	// WebStorm
	EditorType_WEBSTORM EditorType = 11
	// CLion
	EditorType_CLION EditorType = 12
	// PhpStorm
	EditorType_PHPSTORM EditorType = 13
	// RubyMine
	EditorType_RUBYMINE EditorType = 14
	// GoLand
	EditorType_GOLAND EditorType = 15
	// RustRover
	EditorType_RUSTROVER EditorType = 16
	// Helix
	EditorType_HELIX EditorType = 3
	// Vim
	EditorType_VIM EditorType = 4
)

func (EditorType) Descriptor

func (EditorType) Descriptor() protoreflect.EnumDescriptor

func (EditorType) Enum

func (x EditorType) Enum() *EditorType

func (EditorType) EnumDescriptor deprecated

func (EditorType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EditorType.Descriptor instead.

func (EditorType) Number

func (x EditorType) Number() protoreflect.EnumNumber

func (EditorType) String

func (x EditorType) String() string

func (EditorType) Type

type ExportKeymapRequest

type ExportKeymapRequest struct {

	// The editor type.
	EditorType EditorType `protobuf:"varint,1,opt,name=editor_type,json=editorType,proto3,enum=keymap.v1.EditorType" json:"editor_type,omitempty"`
	// The keymap to export.
	Keymap *Keymap `protobuf:"bytes,2,opt,name=keymap,proto3" json:"keymap,omitempty"`
	// The base keymap to compare against.
	Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"`
	// The diff type to use for the export.
	DiffType ExportKeymapRequest_DiffType `` /* 130-byte string literal not displayed */
	// Optional, file path for the keymap config
	FilePath string `protobuf:"bytes,5,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	// contains filtered or unexported fields
}

ExportKeymapRequest is the request message for ExportKeymap.

func (*ExportKeymapRequest) Descriptor deprecated

func (*ExportKeymapRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExportKeymapRequest.ProtoReflect.Descriptor instead.

func (*ExportKeymapRequest) GetBase

func (x *ExportKeymapRequest) GetBase() string

func (*ExportKeymapRequest) GetDiffType

func (*ExportKeymapRequest) GetEditorType

func (x *ExportKeymapRequest) GetEditorType() EditorType

func (*ExportKeymapRequest) GetFilePath

func (x *ExportKeymapRequest) GetFilePath() string

func (*ExportKeymapRequest) GetKeymap

func (x *ExportKeymapRequest) GetKeymap() *Keymap

func (*ExportKeymapRequest) LogValue

func (req *ExportKeymapRequest) LogValue() slog.Value

LogValue implements slog.LogValuer for *ExportKeymapRequest Only log diff_type and editor_type.

func (*ExportKeymapRequest) ProtoMessage

func (*ExportKeymapRequest) ProtoMessage()

func (*ExportKeymapRequest) ProtoReflect

func (x *ExportKeymapRequest) ProtoReflect() protoreflect.Message

func (*ExportKeymapRequest) Reset

func (x *ExportKeymapRequest) Reset()

func (*ExportKeymapRequest) String

func (x *ExportKeymapRequest) String() string

type ExportKeymapRequest_DiffType

type ExportKeymapRequest_DiffType int32

The diff type for exporting.

const (
	// Unspecified diff type.
	ExportKeymapRequest_DIFF_TYPE_UNSPECIFIED ExportKeymapRequest_DiffType = 0
	// ASCII diff.
	ExportKeymapRequest_ASCII_DIFF ExportKeymapRequest_DiffType = 1
	// Unified diff format.
	ExportKeymapRequest_UNIFIED_DIFF ExportKeymapRequest_DiffType = 2
)

func (ExportKeymapRequest_DiffType) Descriptor

func (ExportKeymapRequest_DiffType) Enum

func (ExportKeymapRequest_DiffType) EnumDescriptor deprecated

func (ExportKeymapRequest_DiffType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ExportKeymapRequest_DiffType.Descriptor instead.

func (ExportKeymapRequest_DiffType) Number

func (ExportKeymapRequest_DiffType) String

func (ExportKeymapRequest_DiffType) Type

type ExportKeymapResponse

type ExportKeymapResponse struct {

	// The exported keymap config, editor-specific.
	Keymap string `protobuf:"bytes,1,opt,name=keymap,proto3" json:"keymap,omitempty"`
	// The diff between the original editor-specific keymap config and the exported keymap.
	Diff string `protobuf:"bytes,2,opt,name=diff,proto3" json:"diff,omitempty"`
	// contains filtered or unexported fields
}

ExportKeymapResponse is the response message for ExportKeymap.

func (*ExportKeymapResponse) Descriptor deprecated

func (*ExportKeymapResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExportKeymapResponse.ProtoReflect.Descriptor instead.

func (*ExportKeymapResponse) GetDiff

func (x *ExportKeymapResponse) GetDiff() string

func (*ExportKeymapResponse) GetKeymap

func (x *ExportKeymapResponse) GetKeymap() string

func (*ExportKeymapResponse) LogValue

func (resp *ExportKeymapResponse) LogValue() slog.Value

LogValue implements slog.LogValuer for *ExportKeymapResponse Only log diff.

func (*ExportKeymapResponse) ProtoMessage

func (*ExportKeymapResponse) ProtoMessage()

func (*ExportKeymapResponse) ProtoReflect

func (x *ExportKeymapResponse) ProtoReflect() protoreflect.Message

func (*ExportKeymapResponse) Reset

func (x *ExportKeymapResponse) Reset()

func (*ExportKeymapResponse) String

func (x *ExportKeymapResponse) String() string

type GetKeymapRequest

type GetKeymapRequest struct {

	// The config content.
	Config string `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// Whether to return all keymaps even when there are no bindings yet.
	ReturnAll bool `protobuf:"varint,2,opt,name=return_all,json=returnAll,proto3" json:"return_all,omitempty"`
	// contains filtered or unexported fields
}

GetKeymapRequest is the request message for GetKeymap.

func (*GetKeymapRequest) Descriptor deprecated

func (*GetKeymapRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetKeymapRequest.ProtoReflect.Descriptor instead.

func (*GetKeymapRequest) GetConfig

func (x *GetKeymapRequest) GetConfig() string

func (*GetKeymapRequest) GetReturnAll

func (x *GetKeymapRequest) GetReturnAll() bool

func (*GetKeymapRequest) LogValue

func (req *GetKeymapRequest) LogValue() slog.Value

LogValue implements slog.LogValuer for *GetKeymapRequest config: only print length to avoid logging full content

func (*GetKeymapRequest) ProtoMessage

func (*GetKeymapRequest) ProtoMessage()

func (*GetKeymapRequest) ProtoReflect

func (x *GetKeymapRequest) ProtoReflect() protoreflect.Message

func (*GetKeymapRequest) Reset

func (x *GetKeymapRequest) Reset()

func (*GetKeymapRequest) String

func (x *GetKeymapRequest) String() string

type GetKeymapResponse

type GetKeymapResponse struct {

	// The loaded keymap.
	Keymap *Keymap `protobuf:"bytes,1,opt,name=keymap,proto3" json:"keymap,omitempty"`
	// contains filtered or unexported fields
}

GetKeymapResponse is the response message for GetKeymap.

func (*GetKeymapResponse) Descriptor deprecated

func (*GetKeymapResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetKeymapResponse.ProtoReflect.Descriptor instead.

func (*GetKeymapResponse) GetKeymap

func (x *GetKeymapResponse) GetKeymap() *Keymap

func (*GetKeymapResponse) LogValue

func (resp *GetKeymapResponse) LogValue() slog.Value

LogValue implements slog.LogValuer for *GetKeymapResponse keymap: only compact keybindings {id, key_chords_readable}

func (*GetKeymapResponse) ProtoMessage

func (*GetKeymapResponse) ProtoMessage()

func (*GetKeymapResponse) ProtoReflect

func (x *GetKeymapResponse) ProtoReflect() protoreflect.Message

func (*GetKeymapResponse) Reset

func (x *GetKeymapResponse) Reset()

func (*GetKeymapResponse) String

func (x *GetKeymapResponse) String() string

type ImportKeymapRequest

type ImportKeymapRequest struct {

	// The editor type.
	EditorType EditorType `protobuf:"varint,1,opt,name=editor_type,json=editorType,proto3,enum=keymap.v1.EditorType" json:"editor_type,omitempty"`
	// The source keymap file content in editor-specific config syntax
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// The base keymap to compare against in onekeymap config syntax
	Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"`
	// contains filtered or unexported fields
}

ImportKeymapRequest is the request message for ImportKeymap.

func (*ImportKeymapRequest) Descriptor deprecated

func (*ImportKeymapRequest) Descriptor() ([]byte, []int)

Deprecated: Use ImportKeymapRequest.ProtoReflect.Descriptor instead.

func (*ImportKeymapRequest) GetBase

func (x *ImportKeymapRequest) GetBase() string

func (*ImportKeymapRequest) GetEditorType

func (x *ImportKeymapRequest) GetEditorType() EditorType

func (*ImportKeymapRequest) GetSource

func (x *ImportKeymapRequest) GetSource() string

func (*ImportKeymapRequest) LogValue

func (req *ImportKeymapRequest) LogValue() slog.Value

LogValue implements slog.LogValuer for *ImportKeymapRequest.

func (*ImportKeymapRequest) ProtoMessage

func (*ImportKeymapRequest) ProtoMessage()

func (*ImportKeymapRequest) ProtoReflect

func (x *ImportKeymapRequest) ProtoReflect() protoreflect.Message

func (*ImportKeymapRequest) Reset

func (x *ImportKeymapRequest) Reset()

func (*ImportKeymapRequest) String

func (x *ImportKeymapRequest) String() string

type ImportKeymapResponse

type ImportKeymapResponse struct {

	// The imported keymap.
	Keymap *Keymap `protobuf:"bytes,1,opt,name=keymap,proto3" json:"keymap,omitempty"`
	// The changes between the base and the imported keymap.
	Changes *KeymapChanges `protobuf:"bytes,2,opt,name=changes,proto3" json:"changes,omitempty"`
	// contains filtered or unexported fields
}

ImportKeymapResponse is the response message for ImportKeymap.

func (*ImportKeymapResponse) Descriptor deprecated

func (*ImportKeymapResponse) Descriptor() ([]byte, []int)

Deprecated: Use ImportKeymapResponse.ProtoReflect.Descriptor instead.

func (*ImportKeymapResponse) GetChanges

func (x *ImportKeymapResponse) GetChanges() *KeymapChanges

func (*ImportKeymapResponse) GetKeymap

func (x *ImportKeymapResponse) GetKeymap() *Keymap

func (*ImportKeymapResponse) LogValue

func (resp *ImportKeymapResponse) LogValue() slog.Value

LogValue implements slog.LogValuer for *ImportKeymapResponse keymap: only print number of keybindings changes: for KeyBinding, only print id and key_chords_readable

func (*ImportKeymapResponse) ProtoMessage

func (*ImportKeymapResponse) ProtoMessage()

func (*ImportKeymapResponse) ProtoReflect

func (x *ImportKeymapResponse) ProtoReflect() protoreflect.Message

func (*ImportKeymapResponse) Reset

func (x *ImportKeymapResponse) Reset()

func (*ImportKeymapResponse) String

func (x *ImportKeymapResponse) String() string

type KeyChord

type KeyChord struct {

	// The primary, non-modifier key being pressed.
	KeyCode KeyCode `protobuf:"varint,1,opt,name=key_code,json=keyCode,proto3,enum=keymap.v1.KeyCode" json:"key_code,omitempty"`
	// A list of modifier keys held down with the primary key.
	Modifiers []KeyModifier `protobuf:"varint,2,rep,packed,name=modifiers,proto3,enum=keymap.v1.KeyModifier" json:"modifiers,omitempty"`
	// contains filtered or unexported fields
}

KeyChord represents a combination of a primary key and optional modifiers. e.g. "ctrl+s"

func (*KeyChord) Descriptor deprecated

func (*KeyChord) Descriptor() ([]byte, []int)

Deprecated: Use KeyChord.ProtoReflect.Descriptor instead.

func (*KeyChord) GetKeyCode

func (x *KeyChord) GetKeyCode() KeyCode

func (*KeyChord) GetModifiers

func (x *KeyChord) GetModifiers() []KeyModifier

func (*KeyChord) ProtoMessage

func (*KeyChord) ProtoMessage()

func (*KeyChord) ProtoReflect

func (x *KeyChord) ProtoReflect() protoreflect.Message

func (*KeyChord) Reset

func (x *KeyChord) Reset()

func (*KeyChord) String

func (x *KeyChord) String() string

type KeyCode

type KeyCode int32

KeyCode represents a standard key code. https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf page 53 show keyboard

const (
	// Unspecified key code.
	KeyCode_KEY_CODE_UNSPECIFIED KeyCode = 0
	// Letters
	// The 'A' key.
	KeyCode_A KeyCode = 1
	// The 'B' key.
	KeyCode_B KeyCode = 2
	// The 'C' key.
	KeyCode_C KeyCode = 3
	// The 'D' key.
	KeyCode_D KeyCode = 4
	// The 'E' key.
	KeyCode_E KeyCode = 5
	// The 'F' key.
	KeyCode_F KeyCode = 6
	// The 'G' key.
	KeyCode_G KeyCode = 7
	// The 'H' key.
	KeyCode_H KeyCode = 8
	// The 'I' key.
	KeyCode_I KeyCode = 9
	// The 'J' key.
	KeyCode_J KeyCode = 10
	// The 'K' key.
	KeyCode_K KeyCode = 11
	// The 'L' key.
	KeyCode_L KeyCode = 12
	// The 'M' key.
	KeyCode_M KeyCode = 13
	// The 'N' key.
	KeyCode_N KeyCode = 14
	// The 'O' key.
	KeyCode_O KeyCode = 15
	// The 'P' key.
	KeyCode_P KeyCode = 16
	// The 'Q' key.
	KeyCode_Q KeyCode = 17
	// The 'R' key.
	KeyCode_R KeyCode = 18
	// The 'S' key.
	KeyCode_S KeyCode = 19
	// The 'T' key.
	KeyCode_T KeyCode = 20
	// The 'U' key.
	KeyCode_U KeyCode = 21
	// The 'V' key.
	KeyCode_V KeyCode = 22
	// The 'W' key.
	KeyCode_W KeyCode = 23
	// The 'X' key.
	KeyCode_X KeyCode = 24
	// The 'Y' key.
	KeyCode_Y KeyCode = 25
	// The 'Z' key.
	KeyCode_Z KeyCode = 26
	// Numbers
	// The '0' key on the main keyboard.
	KeyCode_DIGIT_0 KeyCode = 27
	// The '1' key on the main keyboard.
	KeyCode_DIGIT_1 KeyCode = 28
	// The '2' key on the main keyboard.
	KeyCode_DIGIT_2 KeyCode = 29
	// The '3' key on the main keyboard.
	KeyCode_DIGIT_3 KeyCode = 30
	// The '4' key on the main keyboard.
	KeyCode_DIGIT_4 KeyCode = 31
	// The '5' key on the main keyboard.
	KeyCode_DIGIT_5 KeyCode = 32
	// The '6' key on the main keyboard.
	KeyCode_DIGIT_6 KeyCode = 33
	// The '7' key on the main keyboard.
	KeyCode_DIGIT_7 KeyCode = 34
	// The '8' key on the main keyboard.
	KeyCode_DIGIT_8 KeyCode = 35
	// The '9' key on the main keyboard.
	KeyCode_DIGIT_9 KeyCode = 36
	// Modifiers
	// The Caps Lock key.
	KeyCode_CAPS_LOCK KeyCode = 40
	// The Shift key.
	KeyCode_SHIFT KeyCode = 41
	// The Function key.
	KeyCode_FUNCTION KeyCode = 42
	// The Control key.
	KeyCode_CONTROL KeyCode = 43
	// The Option (or Alt) key.
	KeyCode_OPTION KeyCode = 44
	// The Command key.
	KeyCode_COMMAND KeyCode = 45
	// The right Command key.
	KeyCode_RIGHT_COMMAND KeyCode = 46
	// The right Option (or Alt) key.
	KeyCode_RIGHT_OPTION KeyCode = 47
	// The right Control key.
	KeyCode_RIGHT_CONTROL KeyCode = 48
	// The right Shift key.
	KeyCode_RIGHT_SHIFT KeyCode = 49
	// Miscellaneous
	// The Return (or Enter) key.
	KeyCode_RETURN KeyCode = 50
	// The backslash key.
	KeyCode_BACKSLASH KeyCode = 51
	// The backtick (or grave accent) key.
	KeyCode_BACKTICK KeyCode = 52
	// The comma key.
	KeyCode_COMMA KeyCode = 53
	// The equal key.
	KeyCode_EQUAL KeyCode = 54
	// The minus key.
	KeyCode_MINUS KeyCode = 55
	// The plus key.
	KeyCode_PLUS KeyCode = 56
	// The period key.
	KeyCode_PERIOD KeyCode = 57
	// The quote key.
	KeyCode_QUOTE KeyCode = 58
	// The semicolon key.
	KeyCode_SEMICOLON KeyCode = 59
	// The slash key.
	KeyCode_SLASH KeyCode = 60
	// The spacebar.
	KeyCode_SPACE KeyCode = 61
	// The Tab key.
	KeyCode_TAB KeyCode = 62
	// The left bracket key.
	KeyCode_LEFT_BRACKET KeyCode = 63
	// The right bracket key.
	KeyCode_RIGHT_BRACKET KeyCode = 64
	// The Page Up key.
	KeyCode_PAGE_UP KeyCode = 65
	// The Page Down key.
	KeyCode_PAGE_DOWN KeyCode = 66
	// The Home key.
	KeyCode_HOME KeyCode = 67
	// The End key.
	KeyCode_END KeyCode = 68
	// The up arrow key.
	KeyCode_UP_ARROW KeyCode = 69
	// The right arrow key.
	KeyCode_RIGHT_ARROW KeyCode = 70
	// The down arrow key.
	KeyCode_DOWN_ARROW KeyCode = 71
	// The left arrow key.
	KeyCode_LEFT_ARROW KeyCode = 72
	// The Escape key.
	KeyCode_ESCAPE KeyCode = 73
	// The Delete (or Backspace) key.
	KeyCode_DELETE KeyCode = 74
	// The forward delete key.
	KeyCode_FORWARD_DELETE KeyCode = 76
	// The Insert/Help(on Mac) key.
	KeyCode_INSERT_OR_HELP KeyCode = 77
	// The Mute key.
	KeyCode_MUTE KeyCode = 78
	// The Volume Up key.
	KeyCode_VOLUME_UP KeyCode = 79
	// The Volume Down key.
	KeyCode_VOLUME_DOWN KeyCode = 80
	// Function keys
	// The F1 key.
	KeyCode_F1 KeyCode = 90
	// The F2 key.
	KeyCode_F2 KeyCode = 91
	// The F3 key.
	KeyCode_F3 KeyCode = 92
	// The F4 key.
	KeyCode_F4 KeyCode = 93
	// The F5 key.
	KeyCode_F5 KeyCode = 94
	// The F6 key.
	KeyCode_F6 KeyCode = 95
	// The F7 key.
	KeyCode_F7 KeyCode = 96
	// The F8 key.
	KeyCode_F8 KeyCode = 97
	// The F9 key.
	KeyCode_F9 KeyCode = 98
	// The F10 key.
	KeyCode_F10 KeyCode = 99
	// The F11 key.
	KeyCode_F11 KeyCode = 100
	// The F12 key.
	KeyCode_F12 KeyCode = 101
	// The F13 key.
	KeyCode_F13 KeyCode = 102
	// The F14 key.
	KeyCode_F14 KeyCode = 103
	// The F15 key.
	KeyCode_F15 KeyCode = 104
	// The F16 key.
	KeyCode_F16 KeyCode = 105
	// The F17 key.
	KeyCode_F17 KeyCode = 106
	// The F18 key.
	KeyCode_F18 KeyCode = 107
	// The F19 key.
	KeyCode_F19 KeyCode = 108
	// The F20 key.
	KeyCode_F20 KeyCode = 109
	// Numpad
	// The '0' key on the numeric keypad.
	KeyCode_NUMPAD_0 KeyCode = 120
	// The '1' key on the numeric keypad.
	KeyCode_NUMPAD_1 KeyCode = 121
	// The '2' key on the numeric keypad.
	KeyCode_NUMPAD_2 KeyCode = 122
	// The '3' key on the numeric keypad.
	KeyCode_NUMPAD_3 KeyCode = 123
	// The '4' key on the numeric keypad.
	KeyCode_NUMPAD_4 KeyCode = 124
	// The '5' key on the numeric keypad.
	KeyCode_NUMPAD_5 KeyCode = 125
	// The '6' key on the numeric keypad.
	KeyCode_NUMPAD_6 KeyCode = 126
	// The '7' key on the numeric keypad.
	KeyCode_NUMPAD_7 KeyCode = 127
	// The '8' key on the numeric keypad.
	KeyCode_NUMPAD_8 KeyCode = 128
	// The '9' key on the numeric keypad.
	KeyCode_NUMPAD_9 KeyCode = 129
	// The Clear key on the numeric keypad.
	KeyCode_NUMPAD_CLEAR KeyCode = 130
	// The decimal point key on the numeric keypad.
	KeyCode_NUMPAD_DECIMAL KeyCode = 131
	// The divide key on the numeric keypad.
	KeyCode_NUMPAD_DIVIDE KeyCode = 132
	// The Enter key on the numeric keypad.
	KeyCode_NUMPAD_ENTER KeyCode = 133
	// The equals key on the numeric keypad.
	KeyCode_NUMPAD_EQUALS KeyCode = 134
	// The minus key on the numeric keypad.
	KeyCode_NUMPAD_MINUS KeyCode = 135
	// The multiply key on the numeric keypad.
	KeyCode_NUMPAD_MULTIPLY KeyCode = 136
	// The plus key on the numeric keypad.
	KeyCode_NUMPAD_PLUS KeyCode = 137
	// The insert key on the numeric keypad.
	KeyCode_NUMPAD_INSERT KeyCode = 138
)

func (KeyCode) Descriptor

func (KeyCode) Descriptor() protoreflect.EnumDescriptor

func (KeyCode) Enum

func (x KeyCode) Enum() *KeyCode

func (KeyCode) EnumDescriptor deprecated

func (KeyCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use KeyCode.Descriptor instead.

func (KeyCode) Number

func (x KeyCode) Number() protoreflect.EnumNumber

func (KeyCode) String

func (x KeyCode) String() string

func (KeyCode) Type

func (KeyCode) Type() protoreflect.EnumType

type KeyModifier

type KeyModifier int32

KeyModifier represents modifier keys like Shift, Ctrl, Alt, Meta.

const (
	// Unspecified
	KeyModifier_KEY_MODIFIER_UNSPECIFIED KeyModifier = 0
	// Shift key
	KeyModifier_KEY_MODIFIER_SHIFT KeyModifier = 1
	// Ctrl key
	KeyModifier_KEY_MODIFIER_CTRL KeyModifier = 2
	// Alt key
	KeyModifier_KEY_MODIFIER_ALT KeyModifier = 3
	// Meta is Command(⌘) key on macOS, Windows(⊞) key on Windows, super key on Linux
	KeyModifier_KEY_MODIFIER_META KeyModifier = 4
)

func (KeyModifier) Descriptor

func (KeyModifier) Enum

func (x KeyModifier) Enum() *KeyModifier

func (KeyModifier) EnumDescriptor deprecated

func (KeyModifier) EnumDescriptor() ([]byte, []int)

Deprecated: Use KeyModifier.Descriptor instead.

func (KeyModifier) Number

func (x KeyModifier) Number() protoreflect.EnumNumber

func (KeyModifier) String

func (x KeyModifier) String() string

func (KeyModifier) Type

type KeybindConflict

type KeybindConflict struct {

	// The keybinding that is in conflict.
	Keybinding string `protobuf:"bytes,1,opt,name=keybinding,proto3" json:"keybinding,omitempty"`
	// The actions that are in conflict.
	Actions []*KeybindConflict_Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"`
	// contains filtered or unexported fields
}

KeybindConflict is a keybinding conflict detected during validation.

func (*KeybindConflict) Descriptor deprecated

func (*KeybindConflict) Descriptor() ([]byte, []int)

Deprecated: Use KeybindConflict.ProtoReflect.Descriptor instead.

func (*KeybindConflict) GetActions

func (x *KeybindConflict) GetActions() []*KeybindConflict_Action

func (*KeybindConflict) GetKeybinding

func (x *KeybindConflict) GetKeybinding() string

func (*KeybindConflict) ProtoMessage

func (*KeybindConflict) ProtoMessage()

func (*KeybindConflict) ProtoReflect

func (x *KeybindConflict) ProtoReflect() protoreflect.Message

func (*KeybindConflict) Reset

func (x *KeybindConflict) Reset()

func (*KeybindConflict) String

func (x *KeybindConflict) String() string

type KeybindConflict_Action

type KeybindConflict_Action struct {

	// The action identifier.
	Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// The editor command.
	EditorCommand string `protobuf:"bytes,2,opt,name=editor_command,json=editorCommand,proto3" json:"editor_command,omitempty"`
	// contains filtered or unexported fields
}

Action is an action mapped to a editor command.

func (*KeybindConflict_Action) Descriptor deprecated

func (*KeybindConflict_Action) Descriptor() ([]byte, []int)

Deprecated: Use KeybindConflict_Action.ProtoReflect.Descriptor instead.

func (*KeybindConflict_Action) GetAction

func (x *KeybindConflict_Action) GetAction() string

func (*KeybindConflict_Action) GetEditorCommand

func (x *KeybindConflict_Action) GetEditorCommand() string

func (*KeybindConflict_Action) ProtoMessage

func (*KeybindConflict_Action) ProtoMessage()

func (*KeybindConflict_Action) ProtoReflect

func (x *KeybindConflict_Action) ProtoReflect() protoreflect.Message

func (*KeybindConflict_Action) Reset

func (x *KeybindConflict_Action) Reset()

func (*KeybindConflict_Action) String

func (x *KeybindConflict_Action) String() string

type Keybinding added in v0.2.2

type Keybinding struct {

	// The sequence of key chords.
	Chords []*KeyChord `protobuf:"bytes,1,rep,name=chords,proto3" json:"chords,omitempty"`
	// contains filtered or unexported fields
}

Keybinding represents a sequence of one or more key chords that must be pressed in order to trigger an action. This allows for multi-key sequences like "shift shift" or "ctrl+k ctrl+s".

func (*Keybinding) Descriptor deprecated added in v0.2.2

func (*Keybinding) Descriptor() ([]byte, []int)

Deprecated: Use Keybinding.ProtoReflect.Descriptor instead.

func (*Keybinding) GetChords added in v0.2.2

func (x *Keybinding) GetChords() []*KeyChord

func (*Keybinding) ProtoMessage added in v0.2.2

func (*Keybinding) ProtoMessage()

func (*Keybinding) ProtoReflect added in v0.2.2

func (x *Keybinding) ProtoReflect() protoreflect.Message

func (*Keybinding) Reset added in v0.2.2

func (x *Keybinding) Reset()

func (*Keybinding) String added in v0.2.2

func (x *Keybinding) String() string

type KeybindingReadable added in v0.2.2

type KeybindingReadable struct {

	// The key binding that triggers an action.
	KeyChords *Keybinding `protobuf:"bytes,1,opt,name=key_chords,json=keyChords,proto3" json:"key_chords,omitempty"`
	// The readable key binding that triggers an action. e.g. "ctrl+s"
	KeyChordsReadable string `protobuf:"bytes,2,opt,name=key_chords_readable,json=keyChordsReadable,proto3" json:"key_chords_readable,omitempty"`
	// contains filtered or unexported fields
}

KeybindingReadable represents a single keybinding with its readable string

func (*KeybindingReadable) Descriptor deprecated added in v0.2.2

func (*KeybindingReadable) Descriptor() ([]byte, []int)

Deprecated: Use KeybindingReadable.ProtoReflect.Descriptor instead.

func (*KeybindingReadable) GetKeyChords added in v0.2.2

func (x *KeybindingReadable) GetKeyChords() *Keybinding

func (*KeybindingReadable) GetKeyChordsReadable added in v0.2.2

func (x *KeybindingReadable) GetKeyChordsReadable() string

func (*KeybindingReadable) ProtoMessage added in v0.2.2

func (*KeybindingReadable) ProtoMessage()

func (*KeybindingReadable) ProtoReflect added in v0.2.2

func (x *KeybindingReadable) ProtoReflect() protoreflect.Message

func (*KeybindingReadable) Reset added in v0.2.2

func (x *KeybindingReadable) Reset()

func (*KeybindingReadable) String added in v0.2.2

func (x *KeybindingReadable) String() string

type Keymap

type Keymap struct {

	// Keymap name should follow "users/{user}/keymaps/{keymap}" pattern, e.g. users/1234/keymaps/1
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// (-- api-linter: core::0122::embedded-resource=disabled
	//
	//	aip.dev/not-precedent: Action is a value object, not a separately managed resource --)
	//
	// The actions.
	// One action may correspond to multiple keybindings. Then there would be multiple Action
	// with the same keybinding but different id.
	// Clients should merge Action that share the same `id` if necessary.
	Actions []*Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"`
	// contains filtered or unexported fields
}

Keymap is the root message, representing a complete set of keybindings.

func (*Keymap) Descriptor deprecated

func (*Keymap) Descriptor() ([]byte, []int)

Deprecated: Use Keymap.ProtoReflect.Descriptor instead.

func (*Keymap) GetActions added in v0.2.2

func (x *Keymap) GetActions() []*Action

func (*Keymap) GetName

func (x *Keymap) GetName() string

func (*Keymap) ProtoMessage

func (*Keymap) ProtoMessage()

func (*Keymap) ProtoReflect

func (x *Keymap) ProtoReflect() protoreflect.Message

func (*Keymap) Reset

func (x *Keymap) Reset()

func (*Keymap) String

func (x *Keymap) String() string

type KeymapChanges

type KeymapChanges struct {

	// The keymaps that are added.
	Add []*Action `protobuf:"bytes,1,rep,name=add,proto3" json:"add,omitempty"`
	// The keymaps that are removed.
	Remove []*Action `protobuf:"bytes,2,rep,name=remove,proto3" json:"remove,omitempty"`
	// The keymaps that are updated.
	Update []*ActionDiff `protobuf:"bytes,3,rep,name=update,proto3" json:"update,omitempty"`
	// contains filtered or unexported fields
}

KeymapChanges represents the changes to a keymap setting.

func (*KeymapChanges) Descriptor deprecated

func (*KeymapChanges) Descriptor() ([]byte, []int)

Deprecated: Use KeymapChanges.ProtoReflect.Descriptor instead.

func (*KeymapChanges) GetAdd

func (x *KeymapChanges) GetAdd() []*Action

func (*KeymapChanges) GetRemove

func (x *KeymapChanges) GetRemove() []*Action

func (*KeymapChanges) GetUpdate

func (x *KeymapChanges) GetUpdate() []*ActionDiff

func (*KeymapChanges) ProtoMessage

func (*KeymapChanges) ProtoMessage()

func (*KeymapChanges) ProtoReflect

func (x *KeymapChanges) ProtoReflect() protoreflect.Message

func (*KeymapChanges) Reset

func (x *KeymapChanges) Reset()

func (*KeymapChanges) String

func (x *KeymapChanges) String() string

type OnekeymapServiceClient

type OnekeymapServiceClient interface {
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// ImportKeymap imports editor-specific config file
	ImportKeymap(ctx context.Context, in *ImportKeymapRequest, opts ...grpc.CallOption) (*ImportKeymapResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// ExportKeymap exports the current keymap settings.
	ExportKeymap(ctx context.Context, in *ExportKeymapRequest, opts ...grpc.CallOption) (*ExportKeymapResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// ConfigDetect returns the default config path.
	ConfigDetect(ctx context.Context, in *ConfigDetectRequest, opts ...grpc.CallOption) (*ConfigDetectResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// (-- api-linter: core::0131::response-message-name=disabled
	//
	//	aip.dev/not-precedent: GetKeymap is not a standard Get method, it loads from config content --)
	//
	// (-- api-linter: core::0131::request-unknown-fields=disabled
	//
	//	aip.dev/not-precedent: GetKeymap uses config content, not resource name --)
	//
	// (-- api-linter: core::0131::request-name-required=disabled
	//
	//	aip.dev/not-precedent: GetKeymap uses config content, not resource name --)
	//
	// GetKeymap loads a keymap from a text content.
	GetKeymap(ctx context.Context, in *GetKeymapRequest, opts ...grpc.CallOption) (*GetKeymapResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// SaveKeymap saves the current keymap settings to a text content.
	SaveKeymap(ctx context.Context, in *SaveKeymapRequest, opts ...grpc.CallOption) (*SaveKeymapResponse, error)
}

OnekeymapServiceClient is the client API for OnekeymapService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

OnekeymapService provides APIs for managing keymap settings for the UI.

type OnekeymapServiceServer

type OnekeymapServiceServer interface {
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// ImportKeymap imports editor-specific config file
	ImportKeymap(context.Context, *ImportKeymapRequest) (*ImportKeymapResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// ExportKeymap exports the current keymap settings.
	ExportKeymap(context.Context, *ExportKeymapRequest) (*ExportKeymapResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// ConfigDetect returns the default config path.
	ConfigDetect(context.Context, *ConfigDetectRequest) (*ConfigDetectResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// (-- api-linter: core::0131::response-message-name=disabled
	//
	//	aip.dev/not-precedent: GetKeymap is not a standard Get method, it loads from config content --)
	//
	// (-- api-linter: core::0131::request-unknown-fields=disabled
	//
	//	aip.dev/not-precedent: GetKeymap uses config content, not resource name --)
	//
	// (-- api-linter: core::0131::request-name-required=disabled
	//
	//	aip.dev/not-precedent: GetKeymap uses config content, not resource name --)
	//
	// GetKeymap loads a keymap from a text content.
	GetKeymap(context.Context, *GetKeymapRequest) (*GetKeymapResponse, error)
	// (-- api-linter: core::0127::http-annotation=disabled
	//
	//	aip.dev/not-precedent: OnekeymapService only support grpc --)
	//
	// SaveKeymap saves the current keymap settings to a text content.
	SaveKeymap(context.Context, *SaveKeymapRequest) (*SaveKeymapResponse, error)
	// contains filtered or unexported methods
}

OnekeymapServiceServer is the server API for OnekeymapService service. All implementations must embed UnimplementedOnekeymapServiceServer for forward compatibility.

OnekeymapService provides APIs for managing keymap settings for the UI.

type Platform

type Platform int32

Platform represents the platform type.

const (
	// Unspecified
	Platform_PLATFORM_UNSPECIFIED Platform = 0
	// MacOS
	Platform_MACOS Platform = 1
	// Windows, not support yet
	Platform_WINDOWS Platform = 2
	// Linux, not support yet
	Platform_LINUX Platform = 3
)

func (Platform) Descriptor

func (Platform) Descriptor() protoreflect.EnumDescriptor

func (Platform) Enum

func (x Platform) Enum() *Platform

func (Platform) EnumDescriptor deprecated

func (Platform) EnumDescriptor() ([]byte, []int)

Deprecated: Use Platform.Descriptor instead.

func (Platform) Number

func (x Platform) Number() protoreflect.EnumNumber

func (Platform) String

func (x Platform) String() string

func (Platform) Type

type PotentialShadowing

type PotentialShadowing struct {

	// The keybinding that might cause shadowing.
	Keybinding string `protobuf:"bytes,1,opt,name=keybinding,proto3" json:"keybinding,omitempty"`
	// The action mapped to this keybinding.
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// The target editor where shadowing might occur.
	TargetEditor string `protobuf:"bytes,3,opt,name=target_editor,json=targetEditor,proto3" json:"target_editor,omitempty"`
	// A message describing the potential issue.
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

PotentialShadowing is a keybinding that might shadow a critical system shortcut.

func (*PotentialShadowing) Descriptor deprecated

func (*PotentialShadowing) Descriptor() ([]byte, []int)

Deprecated: Use PotentialShadowing.ProtoReflect.Descriptor instead.

func (*PotentialShadowing) GetAction

func (x *PotentialShadowing) GetAction() string

func (*PotentialShadowing) GetKeybinding

func (x *PotentialShadowing) GetKeybinding() string

func (*PotentialShadowing) GetMessage

func (x *PotentialShadowing) GetMessage() string

func (*PotentialShadowing) GetTargetEditor

func (x *PotentialShadowing) GetTargetEditor() string

func (*PotentialShadowing) ProtoMessage

func (*PotentialShadowing) ProtoMessage()

func (*PotentialShadowing) ProtoReflect

func (x *PotentialShadowing) ProtoReflect() protoreflect.Message

func (*PotentialShadowing) Reset

func (x *PotentialShadowing) Reset()

func (*PotentialShadowing) String

func (x *PotentialShadowing) String() string

type SaveKeymapRequest

type SaveKeymapRequest struct {

	// The keymap to save.
	Keymap *Keymap `protobuf:"bytes,1,opt,name=keymap,proto3" json:"keymap,omitempty"`
	// contains filtered or unexported fields
}

SaveKeymapRequest is the request message for SaveKeymap.

func (*SaveKeymapRequest) Descriptor deprecated

func (*SaveKeymapRequest) Descriptor() ([]byte, []int)

Deprecated: Use SaveKeymapRequest.ProtoReflect.Descriptor instead.

func (*SaveKeymapRequest) GetKeymap

func (x *SaveKeymapRequest) GetKeymap() *Keymap

func (*SaveKeymapRequest) LogValue

func (req *SaveKeymapRequest) LogValue() slog.Value

LogValue implements slog.LogValuer for *SaveKeymapRequest keymap: only compact keybindings {id, key_chords_readable}

func (*SaveKeymapRequest) ProtoMessage

func (*SaveKeymapRequest) ProtoMessage()

func (*SaveKeymapRequest) ProtoReflect

func (x *SaveKeymapRequest) ProtoReflect() protoreflect.Message

func (*SaveKeymapRequest) Reset

func (x *SaveKeymapRequest) Reset()

func (*SaveKeymapRequest) String

func (x *SaveKeymapRequest) String() string

type SaveKeymapResponse

type SaveKeymapResponse struct {

	// The saved config content.
	Config string `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

SaveKeymapResponse is the response message for SaveKeymap.

func (*SaveKeymapResponse) Descriptor deprecated

func (*SaveKeymapResponse) Descriptor() ([]byte, []int)

Deprecated: Use SaveKeymapResponse.ProtoReflect.Descriptor instead.

func (*SaveKeymapResponse) GetConfig

func (x *SaveKeymapResponse) GetConfig() string

func (*SaveKeymapResponse) LogValue

func (resp *SaveKeymapResponse) LogValue() slog.Value

LogValue implements slog.LogValuer for *SaveKeymapResponse config: only print length to avoid logging full content

func (*SaveKeymapResponse) ProtoMessage

func (*SaveKeymapResponse) ProtoMessage()

func (*SaveKeymapResponse) ProtoReflect

func (x *SaveKeymapResponse) ProtoReflect() protoreflect.Message

func (*SaveKeymapResponse) Reset

func (x *SaveKeymapResponse) Reset()

func (*SaveKeymapResponse) String

func (x *SaveKeymapResponse) String() string

type Summary

type Summary struct {

	// The total number of mappings processed.
	MappingsProcessed int32 `protobuf:"varint,1,opt,name=mappings_processed,json=mappingsProcessed,proto3" json:"mappings_processed,omitempty"`
	// The number of mappings that succeeded.
	MappingsSucceeded int32 `protobuf:"varint,2,opt,name=mappings_succeeded,json=mappingsSucceeded,proto3" json:"mappings_succeeded,omitempty"`
	// contains filtered or unexported fields
}

Summary is the summary of a validation run.

func (*Summary) Descriptor deprecated

func (*Summary) Descriptor() ([]byte, []int)

Deprecated: Use Summary.ProtoReflect.Descriptor instead.

func (*Summary) GetMappingsProcessed

func (x *Summary) GetMappingsProcessed() int32

func (*Summary) GetMappingsSucceeded

func (x *Summary) GetMappingsSucceeded() int32

func (*Summary) ProtoMessage

func (*Summary) ProtoMessage()

func (*Summary) ProtoReflect

func (x *Summary) ProtoReflect() protoreflect.Message

func (*Summary) Reset

func (x *Summary) Reset()

func (*Summary) String

func (x *Summary) String() string

type UnimplementedOnekeymapServiceServer

type UnimplementedOnekeymapServiceServer struct{}

UnimplementedOnekeymapServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedOnekeymapServiceServer) ConfigDetect

func (UnimplementedOnekeymapServiceServer) ExportKeymap

func (UnimplementedOnekeymapServiceServer) GetKeymap

func (UnimplementedOnekeymapServiceServer) ImportKeymap

func (UnimplementedOnekeymapServiceServer) SaveKeymap

type UnsafeOnekeymapServiceServer

type UnsafeOnekeymapServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeOnekeymapServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OnekeymapServiceServer will result in compilation errors.

type UnsupportedAction

type UnsupportedAction struct {

	// The action that is unsupported.
	Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	// The keybinding that is unsupported.
	Keybinding string `protobuf:"bytes,2,opt,name=keybinding,proto3" json:"keybinding,omitempty"`
	// The target editor that the action is unsupported for.
	TargetEditor string `protobuf:"bytes,3,opt,name=target_editor,json=targetEditor,proto3" json:"target_editor,omitempty"`
	// contains filtered or unexported fields
}

UnsupportedAction is an unsupported action detected during validation.

func (*UnsupportedAction) Descriptor deprecated

func (*UnsupportedAction) Descriptor() ([]byte, []int)

Deprecated: Use UnsupportedAction.ProtoReflect.Descriptor instead.

func (*UnsupportedAction) GetAction

func (x *UnsupportedAction) GetAction() string

func (*UnsupportedAction) GetKeybinding

func (x *UnsupportedAction) GetKeybinding() string

func (*UnsupportedAction) GetTargetEditor

func (x *UnsupportedAction) GetTargetEditor() string

func (*UnsupportedAction) ProtoMessage

func (*UnsupportedAction) ProtoMessage()

func (*UnsupportedAction) ProtoReflect

func (x *UnsupportedAction) ProtoReflect() protoreflect.Message

func (*UnsupportedAction) Reset

func (x *UnsupportedAction) Reset()

func (*UnsupportedAction) String

func (x *UnsupportedAction) String() string

type ValidationIssue

type ValidationIssue struct {

	// Types that are valid to be assigned to Issue:
	//
	//	*ValidationIssue_KeybindConflict
	//	*ValidationIssue_DanglingAction
	//	*ValidationIssue_UnsupportedAction
	//	*ValidationIssue_DuplicateMapping
	//	*ValidationIssue_PotentialShadowing
	Issue isValidationIssue_Issue `protobuf_oneof:"issue"`
	// contains filtered or unexported fields
}

ValidationIssue is a single issue detected during validation.

func (*ValidationIssue) Descriptor deprecated

func (*ValidationIssue) Descriptor() ([]byte, []int)

Deprecated: Use ValidationIssue.ProtoReflect.Descriptor instead.

func (*ValidationIssue) GetDanglingAction

func (x *ValidationIssue) GetDanglingAction() *DanglingAction

func (*ValidationIssue) GetDuplicateMapping

func (x *ValidationIssue) GetDuplicateMapping() *DuplicateMapping

func (*ValidationIssue) GetIssue

func (x *ValidationIssue) GetIssue() isValidationIssue_Issue

func (*ValidationIssue) GetKeybindConflict

func (x *ValidationIssue) GetKeybindConflict() *KeybindConflict

func (*ValidationIssue) GetPotentialShadowing

func (x *ValidationIssue) GetPotentialShadowing() *PotentialShadowing

func (*ValidationIssue) GetUnsupportedAction

func (x *ValidationIssue) GetUnsupportedAction() *UnsupportedAction

func (*ValidationIssue) ProtoMessage

func (*ValidationIssue) ProtoMessage()

func (*ValidationIssue) ProtoReflect

func (x *ValidationIssue) ProtoReflect() protoreflect.Message

func (*ValidationIssue) Reset

func (x *ValidationIssue) Reset()

func (*ValidationIssue) String

func (x *ValidationIssue) String() string

type ValidationIssue_DanglingAction

type ValidationIssue_DanglingAction struct {
	// DanglingAction is that an action is mapped to a keybinding that does not exist.
	DanglingAction *DanglingAction `protobuf:"bytes,2,opt,name=dangling_action,json=danglingAction,proto3,oneof"`
}

type ValidationIssue_DuplicateMapping

type ValidationIssue_DuplicateMapping struct {
	// DuplicateMapping is that the same action and keybinding combination appears multiple times.
	DuplicateMapping *DuplicateMapping `protobuf:"bytes,4,opt,name=duplicate_mapping,json=duplicateMapping,proto3,oneof"`
}

type ValidationIssue_KeybindConflict

type ValidationIssue_KeybindConflict struct {
	// KeybindConflict is that multiple actions are mapped to the same keybinding.
	KeybindConflict *KeybindConflict `protobuf:"bytes,1,opt,name=keybind_conflict,json=keybindConflict,proto3,oneof"`
}

type ValidationIssue_PotentialShadowing

type ValidationIssue_PotentialShadowing struct {
	// PotentialShadowing is that a keybinding might shadow a critical system shortcut.
	PotentialShadowing *PotentialShadowing `protobuf:"bytes,5,opt,name=potential_shadowing,json=potentialShadowing,proto3,oneof"`
}

type ValidationIssue_UnsupportedAction

type ValidationIssue_UnsupportedAction struct {
	// UnsupportedAction is that an action is mapped to a keybinding that is not supported by the target editor.
	UnsupportedAction *UnsupportedAction `protobuf:"bytes,3,opt,name=unsupported_action,json=unsupportedAction,proto3,oneof"`
}

type ValidationReport

type ValidationReport struct {

	// The source editor of the validation run.
	SourceEditor string `protobuf:"bytes,1,opt,name=source_editor,json=sourceEditor,proto3" json:"source_editor,omitempty"`
	// The summary of the validation run.
	Summary *Summary `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
	// The issues detected during the validation run.
	Issues []*ValidationIssue `protobuf:"bytes,3,rep,name=issues,proto3" json:"issues,omitempty"`
	// The warnings issued during the validation run.
	// Warnings are just issues that tend to not harm
	Warnings []*ValidationIssue `protobuf:"bytes,4,rep,name=warnings,proto3" json:"warnings,omitempty"`
	// contains filtered or unexported fields
}

ValidationReport is the overall report of a validation run.

func (*ValidationReport) Descriptor deprecated

func (*ValidationReport) Descriptor() ([]byte, []int)

Deprecated: Use ValidationReport.ProtoReflect.Descriptor instead.

func (*ValidationReport) GetIssues

func (x *ValidationReport) GetIssues() []*ValidationIssue

func (*ValidationReport) GetSourceEditor

func (x *ValidationReport) GetSourceEditor() string

func (*ValidationReport) GetSummary

func (x *ValidationReport) GetSummary() *Summary

func (*ValidationReport) GetWarnings

func (x *ValidationReport) GetWarnings() []*ValidationIssue

func (*ValidationReport) ProtoMessage

func (*ValidationReport) ProtoMessage()

func (*ValidationReport) ProtoReflect

func (x *ValidationReport) ProtoReflect() protoreflect.Message

func (*ValidationReport) Reset

func (x *ValidationReport) Reset()

func (*ValidationReport) String

func (x *ValidationReport) String() string

Jump to

Keyboard shortcuts

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