Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
20 lines
393 B
Plaintext
20 lines
393 B
Plaintext
"use client";
|
|
|
|
// src/utils/index.ts
|
|
import { isAppleDevice } from "@react-aria/utils";
|
|
import { isMac } from "@react-aria/utils";
|
|
function isNonContiguousSelectionModifier(e) {
|
|
return isAppleDevice() ? e.altKey : e.ctrlKey;
|
|
}
|
|
function isCtrlKeyPressed(e) {
|
|
if (isMac()) {
|
|
return e.metaKey;
|
|
}
|
|
return e.ctrlKey;
|
|
}
|
|
|
|
export {
|
|
isNonContiguousSelectionModifier,
|
|
isCtrlKeyPressed
|
|
};
|