mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-09-29 03:28:11 +00:00
feat(messaging): add message overlay logic
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Utility file for detecting whether the
|
||||
* shift key is currently pressed or not.
|
||||
*/
|
||||
|
||||
export let shiftKeyPressed = false;
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
document.addEventListener("keydown", (ev) => {
|
||||
if (ev.shiftKey) shiftKeyPressed = true;
|
||||
else shiftKeyPressed = false;
|
||||
});
|
||||
|
||||
document.addEventListener("keyup", (ev) => {
|
||||
if (ev.shiftKey) shiftKeyPressed = true;
|
||||
else shiftKeyPressed = false;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user