Fix #3214: fix ;x/;X on HiDPI screens

(perhaps: untested)
This commit is contained in:
Oliver Blanthorn 2021-01-14 19:42:44 +01:00
parent 6a7f7bf1c9
commit 960eeb722e
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -1144,9 +1144,9 @@ const platform_defaults = {
linux: {
nmaps: {
";x":
'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + pos.x + " " + pos.y + "; xdotool click 1")}',
'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + window.devicePixelRatio * pos.x + " " + window.devicePixelRatio * pos.y + "; xdotool click 1")}',
";X":
'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + pos.x + " " + pos.y + "; xdotool keydown ctrl+shift; xdotool click 1; xdotool keyup ctrl+shift")}',
'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + window.devicePixelRatio * pos.x + " " + window.devicePixelRatio * pos.y + "; xdotool keydown ctrl+shift; xdotool click 1; xdotool keyup ctrl+shift")}',
} as unknown,
},
} as Record<browser.runtime.PlatformOs, default_config>