Skip to content

Commit 6dd65fb

Browse files
committed
Add JSONRPC handling
1 parent 9698564 commit 6dd65fb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

jsonrpc.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,18 @@ func rpcSetCloudUrl(apiUrl string, appUrl string) error {
877877
return nil
878878
}
879879

880+
func rpcGetKeyboardLayout() (string, error) {
881+
return config.KeyboardLayout, nil
882+
}
883+
884+
func rpcSetKeyboardLayout(layout string) error {
885+
config.KeyboardLayout = layout
886+
if err := SaveConfig(); err != nil {
887+
return fmt.Errorf("failed to save config: %w", err)
888+
}
889+
return nil
890+
}
891+
880892
func getKeyboardMacros() (interface{}, error) {
881893
macros := make([]KeyboardMacro, len(config.KeyboardMacros))
882894
copy(macros, config.KeyboardMacros)

0 commit comments

Comments
 (0)