mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-04-04 03:21:03 +00:00
14 lines
285 B
JavaScript
14 lines
285 B
JavaScript
import environment from '$lib/stores/environment';
|
|
import { get } from 'svelte/store';
|
|
|
|
export function controlKeyDown(event) {
|
|
const env = get(environment);
|
|
// @ts-ignore
|
|
if (env?.platform === 'darwin') {
|
|
return event?.metaKey;
|
|
}
|
|
else {
|
|
return event?.ctrlKey;
|
|
}
|
|
}
|