Back Home
TOC Loading..
Keyframes
References
Github Repo
Webflow Cloneable

How (and why) to add keyboard shortcuts to your Webflow site

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.

Why it’s worth it

  • Feels like an app — visitors get a faster, smoother way to navigate or discover things.
  • Low lift — literally one script tag; no major design changes needed.
  • Memorable — people remember the small touches.
  • Encourages exploration — you can open a contact form, search the site or go the login screen. It lets the user 'learn' how to use your site.

A quick example

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 list
  • A custom shortcut to open filters

A few tips from trying it

  • Don’t trigger shortcuts while someone’s typing in a form.
  • Always give a visual cue that the shortcut exists (like a small “⌘K” hint next to your nav search).
  • Escape key should always close whatever you open.
  • If you can, animate — even a small fade or scale makes the interaction feel smoother.
  • Test it on both Mac and Windows so you’re not accidentally ignoring half your users.
  • cmd / ctrl are already used for a lot of things. I'd recommend using opt / alt if you want lots of shortcuts

It’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.

Writings

Managing UI State in Webflow with JavaScript

A concise introduction to front-end reactivity, showing why data should control the UI and how to create and watch reactive variables using Vue’s reactivity system, with practical examples.

Using HonoJS with your reverse proxy

Hono.js replaces messy if/else chains with clean, readable routing to build a reverse proxy that scales

Reverse Proxy First Steps

In the next ~30 minutes, you'll have two different sites running under one URL.

Webflow Reverse Proxy Overview: What It Is, Why It Matters, and When to Use It

Reverse proxies are the gateway drug to Webflow Enterprise. Almost every enterprise project I’ve been involved in has implemented it in some form.

Building a Webflow to Algolia Sync with Cloudflare Workers

Build an automated sync between Webflow's CMS and Algolia's search service using Cloudflare Workers.

Using Videos Effectively in Webflow (Without Losing Your Mind)

If you’ve ever used Webflow’s native background video component and thought “damn, that looks rough” I'm here for you.

Webflow + Cloudflare reverse proxy. Why and How

As more companies move to Webflow and demand for Webflow Enterprise grows, you’ll see more teams leaning on reverse proxies to solve some of Webflow’s infrastructure limitations.

Useful GSAP utilities

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.

Using Functions as Property Values in GSAP (And Why You Probably Should)

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.

Organising JavaScript in Webflow: Exploring Scalable Patterns

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.

Building a Scroll-Based Image Sequencer with GSAP

An exploration in building a scroll-driven image sequence animation using GSAP and HTML5 canvas. Using Avif file compression with the Avif CLI, hosting strategies (Webflow vs AWS), GSAP and the quirks of working with canvas.