indexzero / indexzero/dotfiles

Use hammerspoon to rebind numeric keypad

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

-- Function to remap numpad keys to top-row keys
function remapNumpadToTopRow(padKey, topKey)
    -- Bind the numpad key with all possible modifiers
    hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, padKey, function()
        -- Simulate pressing the top-row key with the *actual* currently pressed modifiers
        local mods = hs.eventtap.checkMouseKeys() -- A helper to get current modifiers
        hs.eventtap.keyStroke(mods, topKey)
    end)
end

-- Apply this function for each number 1-9 and 0
remapNumpadToTopRow("pad0", "0")
remapNumpadToTopRow("pad1", "1")
remapNumpadToTopRow("pad2", "2")
remapNumpadToTopRow("pad3", "3")
remapNumpadToTopRow("pad4", "4")
remapNumpadToTopRow("pad5", "5")
remapNumpadToTopRow("pad6", "6")
remapNumpadToTopRow("pad7", "7")
remapNumpadToTopRow("pad8", "8")
remapNumpadToTopRow("pad9", "9")

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the repository's Hammerspoon or Lua configuration, since no target file is named. Compare the existing setup with the provided keypad-to-top-row mapping and verify that numeric keypad keys work with the intended modifiers; done means the mappings are integrated and usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.