diff --git a/Telegram/Resources/iv_html/page.js b/Telegram/Resources/iv_html/page.js index fda34772fe..9bd67163a9 100644 --- a/Telegram/Resources/iv_html/page.js +++ b/Telegram/Resources/iv_html/page.js @@ -72,6 +72,9 @@ var IV = { } }, frameKeyDown: function (e) { + const key0 = (e.key === '0') + || (e.code === 'Key0') + || (e.keyCode === 48); const keyW = (e.key === 'w') || (e.code === 'KeyW') || (e.keyCode === 87); @@ -81,12 +84,12 @@ var IV = { const keyM = (e.key === 'm') || (e.code === 'KeyM') || (e.keyCode === 77); - if ((e.metaKey || e.ctrlKey) && (keyW || keyQ || keyM)) { + if ((e.metaKey || e.ctrlKey) && (keyW || keyQ || keyM || key0)) { e.preventDefault(); IV.notify({ event: 'keydown', modifier: e.ctrlKey ? 'ctrl' : 'cmd', - key: keyW ? 'w' : keyQ ? 'q' : 'm', + key: key0 ? '0' : keyW ? 'w' : keyQ ? 'q' : 'm', }); } else if (e.key === 'Escape' || e.keyCode === 27) { e.preventDefault(); diff --git a/Telegram/SourceFiles/iv/iv_controller.cpp b/Telegram/SourceFiles/iv/iv_controller.cpp index 6065701664..62348a9869 100644 --- a/Telegram/SourceFiles/iv/iv_controller.cpp +++ b/Telegram/SourceFiles/iv/iv_controller.cpp @@ -957,6 +957,8 @@ void Controller::processKey(const QString &key, const QString &modifier) { minimize(); } else if (key == u"q"_q && modifier == ctrl) { quit(); + } else if (key == u"0"_q && modifier == ctrl) { + _delegate->ivSetZoom(kDefaultZoom); } }