1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

chore: Refactor isSelectionKey

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-05-24 12:10:27 -04:00
parent 5811695e49
commit 8fc9fc7a66

View File

@ -12,10 +12,9 @@ const isMultiSelectionKeyInjectable = getInjectable({
id: "is-multi-selection-key", id: "is-multi-selection-key",
instantiate: (di): IsMultiSelectionKey => { instantiate: (di): IsMultiSelectionKey => {
const isMac = di.inject(isMacInjectable); const isMac = di.inject(isMacInjectable);
const specificKey = isMac ? "Meta" : "Control";
return isMac return ({ key }) => key === specificKey;
? ({ key }) => key === "Meta"
: ({ key }) => key === "Control";
}, },
}); });