[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1792953883902.jpg (208.01 KB, 1024x1024, img_1792953874966_ndmid9f1.jpg)ImgOps Exif Google Yandex

95514 No.2383

finally found a way to handle azerty layouts without losing my mind. using e.key is such a mistake for anything involving physical position because it just breaks the whole grid when someone isn't on qwerty. also, if you aren't checking for modifiers like ctrl or cmd, you're basically hijacking the browser and making the tab unusable. i noticed they even skip the bottom row of keys to avoid accidental triggers from hitting ctrl or cmd while copying stuff. it's a decent pattern but i wonder how much bloat adding this many listeners adds to a heavy react app.

const CODE_TO_SLOT = new Map (  SLOT_CODES.map ((code, i) => [code, i]));


article: https://dev.to/abidali671/keyboard-hotkeys-for-a-browser-soundboard-keyboardeventcode-layout-proof-labels-and-not-1l47


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]