Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
PRJ-121 Add an option to disable automatic keymap setting
Browse files Browse the repository at this point in the history
  • Loading branch information
SerVB committed Sep 28, 2020
1 parent fe3254c commit 25f1e3d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,10 @@ class ProjectorServer private constructor(
is ClientOpenLinkEvent -> markdownPanelUpdater.openInExternalBrowser(message.link)

is ClientSetKeymapEvent -> if (isAgent) {
logger.info { "Client keymap was ignored!" }
logger.info { "Client keymap was ignored (agent mode)!" }
}
else if (getProperty(ENABLE_AUTO_KEYMAP_SETTING)?.toBoolean() == false) {
logger.info { "Client keymap was ignored (property specified)!" }
}
else {
KeymapSetter.setKeymap(message.keymap)
Expand Down Expand Up @@ -972,5 +975,7 @@ class ProjectorServer private constructor(
var BIG_COLLECTIONS_CHECKS_START_SIZE =
System.getProperty("org.jetbrains.projector.server.debug.collections.checks.size")?.toIntOrNull()
?: DEFAULT_BIG_COLLECTIONS_CHECKS_SIZE

const val ENABLE_AUTO_KEYMAP_SETTING = "ORG_JETBRAINS_PROJECTOR_SERVER_AUTO_KEYMAP"
}
}

0 comments on commit 25f1e3d

Please sign in to comment.