Monday, March 02, 2026

Re: firefox: fix arrow keys in js terminals (Proxmox/ESXi for example)

Works nicely for me - I'd be very happy to have this.

On 2026/03/01 20:41, Matthieu Herrb wrote:
> Hi,
>
> When using firefox to connect to a proxmox hypervisor or other kind of
> application that provide a terminal emulator withing the browser, one
> may observe that the arrow keys don't work propoerly under OpenBSD.
>
> This has been debugged by David Brownlee and "RVP" under NetBSD
> (see the thread at
> https://marc.infœ?l=netbsd-current-users&m=176721894101063&w=2)
>
> Below is an adaptation (with the help of landry@) of the patch they
> came up with for NetBSD :
>
> I do agree with them that in the long term wscons should be switched
> to provide evdev compatible keycodes. But in the mean time, this makes
> the arrows work the console under Proxmox/ESXi.
>
> ok ?
>
> Index: Makefile
> ===================================================================
> RCS file: /local/cvs/ports/www/mozilla-firefox/Makefile,v
> diff -u -p -u -r1.673 Makefile
> --- Makefile 24 Feb 2026 13:58:51 -0000 1.673
> +++ Makefile 1 Mar 2026 19:34:02 -0000
> @@ -9,6 +9,8 @@ MOZILLA_PROJECT = firefox
> MOZILLA_CODENAME = browser
> MOZILLA_PROFDATA_TASKID = djIMt7uyQSee2RWDha6PvA
>
> +REVISION = 0
> +
> WRKDIST = ${WRKDIR}/${MOZILLA_DIST}-${MOZILLA_DIST_VERSION:C/b[0-9]*//}
> HOMEPAGE = https://www.mozilla.org/firefox/
> SO_VERSION = 160.0
> Index: patches/patch-widget_NativeKeyToDOMCodeName_h
> ===================================================================
> RCS file: patches/patch-widget_NativeKeyToDOMCodeName_h
> diff -N patches/patch-widget_NativeKeyToDOMCodeName_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-widget_NativeKeyToDOMCodeName_h 1 Mar 2026 19:34:02 -0000
> @@ -0,0 +1,72 @@
> +Index: widget/NativeKeyToDOMCodeName.inc
> +--- widget/NativeKeyToDOMCodeName.h.orig
> ++++ widget/NativeKeyToDOMCodeName.h
> +@@ -379,7 +379,9 @@ CODE_MAP_ANDROID(Tab, 0x000F)
> +
> + // IME keys
> + CODE_MAP_WIN(Convert, 0x0079)
> ++#if ! defined(__OpenBSD__)
> + CODE_MAP_X11(Convert, 0x0064)
> ++

No comments:

Post a Comment