While building this portfolio some months back, I thought it would be a nice touch to add the keyboard shortcut. After implementing it, I had a “why didn’t I always do this?” moment. A tiny sprinkle of JavaScript, and suddenly the whole site felt more polished and thoughtful.
It’s the same thing you see in productivity tools — press ⌘K
or Ctrl+K
and something useful happens. That little interaction tells visitors, this site is alive, it understands me. For marketing teams and business owners, it’s one of the cheapest ways to add that feeling without a big design or dev sprint.
Here’s the simplest version I used for opening a popup with ⌘K
/ Ctrl+K
:
document.addEventListener('keydown', event => {
const isModifier = event.metaKey || event.ctrlKey;
const isKKey = event.key.toLowerCase() === 'k';
if (isModifier && isKKey) {
event.preventDefault();
let tl = gsap.timeline();
tl.to('.popup_wrap', {
pointerEvents: 'auto',
opacity: 1
}).fromTo('.popup_wrap h2', { scale: 0 }, { scale: 1 });
}
});
You can adapt the same pattern for:
Esc
to close a modal?
to open a keyboard shortcuts listIt’s not going to change your conversion rate overnight, but it does change how people feel using your site. And in a space where most sites feel the same, those small feelings add up.
I use this little snippet in almost every project. It's clean, simple and has lots of room for creativity.
Since Finsweet released its attributes as open source, I've been dipping in and out to understand how the API works and how it can be used effectively. Here's an explanation of the API methods and properties that I use pretty frequently to open more doors in my projects.
A practical, code-heavy dive into GSAP’s utility functions—keyframes, pipe, clamp, normalize, and interpolate—and why they’re so much more than just shortcuts for animation math.
GSAP lets you pass _functions_ as property values. I've known this for a while but never really explored it particularly deeply. Over the last couple of weeks I've been testing, experimenting and getting creative with it to deepen my understanding.
Exploring ways to keep JavaScript modular and maintainable in Webflow — from Slater to GitHub to a custom window.functions pattern. A look at what’s worked (and what hasn’t) while building more scalable websites.