Desktop: Ctrl + numpad +/-/0 do not zoom (Electron zoomIn/zoomOut/resetZoom role accelerators match main keyboard only)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- electron, javascript
- Domain
- desktop
Research direction
Start in runtime/src/js/pgadmin.js at launchPgAdminWindow and compare its input handling with the zoom roles assembled in runtime/src/js/menu.js. Run the Electron desktop build and verify that Ctrl plus numpad +, -, and 0 work alongside the existing main-keyboard shortcuts; the report has only been tested on Linux Wayland.
Written by the indexing model from the issue text.
Description
i build pgadmin4 locally on linux, as Electron desktop, from source; it builds/installs ok
Version 9.18
Application Mode Desktop
Commit ecb6446c313b69ec1310b5816178e79040f98a92 (2026-10-02 17:41 +0100)
Python Version 3.14.7
Electron Version 44.4.5
Browser Chrome 152.0.7977.130
Operating System Fedora Linux 44 (Forty Four), Linux-7.2.8-200.fc44.x86_64-x86_64-with-glibc2.43
rpm -qa pgadmin4-electron
pgadmin4-electron-git_master-0.20261004_135416.gitecb6446.fc44.x86_64
on exec of the Desktop runtime,
-- Ctrl + main-keyboard + (=), - and 0 zoom in, zoom out and reset as expected
-- UI View > Zoom In / Zoom Out / Actual Size work from the menu
BUT,
-- Ctrl + numpad +, Ctrl + numpad - and Ctrl + numpad 0 do nothing
checking src,
runtime/src/js/menu.js:169-171
{ role: 'resetZoom' },
{ role: 'zoomIn' },
{ role: 'zoomOut' },
builds the View menu zoom items from Electron menu roles.
electron v44.4.5 hardcodes those roles' accelerators in lib/browser/api/menu-item-roles.ts
resetzoom: accelerator: 'CommandOrControl+0' (line 169)
zoomin: accelerator: 'CommandOrControl+Plus' (line 238)
zoomout: accelerator: 'CommandOrControl+-' (line 246)
electron v44.4.5's accelerator parser, shell/common/keyboard_util.cc, maps those only to main-keyboard keys.
numpad keys are SEPARATE key codes, reachable only through separate tokens; e.g.:
"plus" -> ui::VKEY_OEM_PLUS (line 97, main keyboard)
"numadd" -> ui::VKEY_ADD (line 88)
"numsub" -> ui::VKEY_SUBTRACT (line 93)
"num0" -> ui::VKEY_NUMPAD0 (line 78)
since menu items hold only ONE accelerator, role items can't be edited to ALSO match a numpad key.
a workaround/fix is to handle numpad keys directly in the main window with a before-input-event handler, matched on input.code.
e.g., this works
diff --git a/runtime/src/js/pgadmin.js b/runtime/src/js/pgadmin.js
--- a/runtime/src/js/pgadmin.js
+++ b/runtime/src/js/pgadmin.js
@@ -381,6 +381,23 @@ function launchPgAdminWindow() {
splashWindow.close();
pgAdminMainScreen.webContents.session.clearCache();
+ // Electron's zoomIn/zoomOut/resetZoom menu roles match only the
+ // main-keyboard keys; handle the numpad keys at window level.
+ pgAdminMainScreen.webContents.on('before-input-event', (event, input) => {
+ if (input.type !== 'keyDown' || !(input.control || input.meta)) return;
+ const wc = pgAdminMainScreen.webContents;
+ if (input.code === 'NumpadAdd') {
+ wc.setZoomLevel(wc.getZoomLevel() + 0.5);
+ } else if (input.code === 'NumpadSubtract') {
+ wc.setZoomLevel(wc.getZoomLevel() - 0.5);
+ } else if (input.code === 'Numpad0') {
+ wc.setZoomLevel(0);
+ } else {
+ return;
+ }
+ event.preventDefault();
+ });
+
setupMenu(pgAdminMainScreen, configStore, menuCallbacks);
setupDownloader();
with that patch/build, Ctrl- +/-/0 work BOTH on main keyboard AND numpad.
i've only tested this on Linux/KDE Plasma/Wayland
NOT tested on X11, Windows or macOS.
but iiuc the role accelerators are the same on all platforms, so i'd expect the same behavior on those.
- Dominant language
- Python
- Stars
- 3.9k
- Forks
- 904
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 28
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pgadmin-org/pgadmin4
-
Inherited columns are not removed from a table's Columns tab after removing the parent table from "Inherited from"Possibly taken @G-Glitch404 claimed this 4 days ago. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pgadmin-org/pgadmin4#10470 · 1 comment ·
Maintainers usually reply within 1 day
-
Query Tool: first 4 MB of a large file is loaded twice when a later chunk isn't valid UTF-8Possibly taken @dev-hari-prasad claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pgadmin-org/pgadmin4#10462 · 1 comment ·
Maintainers usually reply within 1 day
-
Feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pgadmin-org/pgadmin4#10426 · 3 comments ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pgadmin-org/pgadmin4#10424 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pgadmin-org/pgadmin4#10418 ·
Maintainers usually reply within 1 day
All issues in pgadmin-org/pgadmin4
Similar issues
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 65/100
ansys/pydpf-core#3547 ·
Maintainers usually reply within 1 day
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#5457 ·
Maintainers usually reply within 1 day
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recordingPossibly taken @ktz03 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#5806 ·
Maintainers usually reply within 1 day
-
HTML: <template> content is extracted as document textPossibly taken @ryanmeowy claimed this today. Openbug html
Difficulty 1/5 Under an hour Newbie friendliness 82/100
docling-project/docling#4714 · 2 comments ·
Maintainers usually reply within 1 day
-
APIv2 event data accepts a non-string reply and a NaN upper_boundPossibly taken @awss1i claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
freedomofpress/securedrop#7946 · 1 comment ·
Maintainers usually reply within 2 days