Zulip-desktop: zoom in/out doesn't work for both Ctr -/+ keys

Created on 1 Dec 2017  路  6Comments  路  Source: zulip/zulip-desktop

Short keys used for zoom in/out are
Linux/Windows - CTRL+ for zoom in, CTRL- for zoom out

zoom in/out should work for both -/+ keys of keyboard(in case keyboard have two keys for -/+).
They have different key code as they are different keys(ex. for - 109 and 189), so we have to set event for both key codes.

More discussion about this issue here.

Low blocked-upstream help wanted

Most helpful comment

@abhigyank good catch. This is an upstream bug. Pushed a temporary fix in https://github.com/zulip/zulip-electron/commit/1948ba2cc3b052faa51e02a66f9ecb0865371133. So now Ctrl+ works as expected but it appears as Ctrl+= on Linux/Windows.

All 6 comments

Look at the code for zoom functionality - here. Electron doesn't support numpad hotkeys -
https://github.com/electron/electron/issues/3332. Ideally, this should be fixed in electron. Can you submit the same issue there?

To fix this here, we need to listen for keydown event in preload.js. I have a macOS keyboard so can't work on this.

Submitted as electron/electron#11310 in electron.

For Linux, Zoom in works at Ctrl+Shift++, instead of traditional Ctrl++. Is it intentional or a bug?

@abhigyank good catch. This is an upstream bug. Pushed a temporary fix in https://github.com/zulip/zulip-electron/commit/1948ba2cc3b052faa51e02a66f9ecb0865371133. So now Ctrl+ works as expected but it appears as Ctrl+= on Linux/Windows.

So now the shortcuts in Linux/Windows are:
Ctrl + +/= for zoom in
Ctrl + -/_ is for zoom out and
Ctrl + )/0 is for zoom reset

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeSeulArtichaut picture LeSeulArtichaut  路  3Comments

brainwane picture brainwane  路  5Comments

zingmars picture zingmars  路  11Comments

dylnuge picture dylnuge  路  5Comments

EpicEric picture EpicEric  路  6Comments