My first post here, guys but I am always here reading through topics.
Anyways that image gallery project, while it seems pretty simple in the development world, it boosted up my self-confidence, It was very fun for me to write js codes, what an awesome feeling when it was all done.
Here my project uploaded in github, I played around with codes so I added the AddEventListener keys to browse the images and also to lighten/darken the image, I wanted to show you so I can get a feedback about it if there is like a better way for some code written or more an “elegant” way like MDN technical writer said many times.
you can merge the 2 listener to the document keydown together
try t find another key to activate the dark and light as alt in linux show the menu bar of the browser and i think it the same for windows but i do not know about mac
i think use multi key would be better maybe 3 key so you be away from already used shortcut key
Thank you very much !
1- yeah you’re right, I was too focused on organising my main.js, so yeah done it merged them into 1 document event listener
2- Changed it to SHIFT instead of ALT
when i use your code in chrome based browser it work fine but when i use firefox on my linux it did not i even tried to print the e.code to the console i found it did not even print anything when i press shift or alt or ctrl
not sure if it some crazy configration i did to my firefox or i miss something
if it work fine in your firefox then it my issue then
but you doing great and well done and you welcome
and have a nice day