From nobody Wed Mar 01 12:02:51 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PRXtV5KvBz3vmn3 for ; Wed, 1 Mar 2023 12:02:58 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PRXtT6fbFz4XNX for ; Wed, 1 Mar 2023 12:02:57 +0000 (UTC) (envelope-from guru@unixarea.de) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of guru@unixarea.de designates 178.254.4.101 as permitted sender) smtp.mailfrom=guru@unixarea.de; dmarc=none Received: from [188.174.54.98] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXLAa-0006z5-34 for freebsd-questions@freebsd.org; Wed, 01 Mar 2023 13:02:52 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.16.1/8.14.9) with ESMTPS id 321C2pug014197 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 1 Mar 2023 13:02:51 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.16.1/8.14.9/Submit) id 321C2pFG014196 for freebsd-questions@freebsd.org; Wed, 1 Mar 2023 13:02:51 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Wed, 1 Mar 2023 13:02:51 +0100 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: Re: Moving a FreeBSD/X11 keyboard confif to Macbook Pro Message-ID: Reply-To: Matthias Apitz Mail-Followup-To: freebsd-questions@freebsd.org References: <20230301074107.GB9@sh4-5.1blu.de> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230301074107.GB9@sh4-5.1blu.de> X-Operating-System: FreeBSD 13.0-CURRENT r368166 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.54.98 X-Spamd-Result: default: False [-2.80 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-1.00)[-0.998]; MID_RHS_NOT_FQDN(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:178.254.4.101:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[unixarea.de]; FROM_HAS_DN(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:42730, ipnet:178.254.0.0/19, country:DE]; HAS_XAW(0.00)[]; HAS_XOIP(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[178.254.4.101:from]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; HAS_REPLYTO(0.00)[guru@unixarea.de] X-Rspamd-Queue-Id: 4PRXtT6fbFz4XNX X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N El día miércoles, marzo 01, 2023 a las 08:41:07a. m. +0100, Matthias Apitz escribió: > > Hello, > > This might be in half part off topic, but if I ask this in a Macbook > mailing list (don't even know if such lists exist), it would also be > half off topic there :-) > > I'm running FreeBSD for nearly 30 years now and with a X11 keyboard > configuration which allows me to type German/English/Spanish at the same > time, usind for the later the useless Windows-key as a modifier key. The > config is done by some simple script like this: > > /usr/local/bin/setxkbmap -model pc105 \ > -layout de,us \ > -option "altwin:swap_alt_win" \ > -option "lv3:ralt_switch" > > # we use the Win-key to add more (esp. Spanish) letters to the keys: > # > # Spanish tilded chars (use Mode_switch + char) > # > xmodmap -e "keycode 133 = Mode_switch" > xmodmap -e "keycode 0x39 = n N ntilde Ntilde" > xmodmap -e "keycode 0x1a = e E eacute Eacute" > xmodmap -e "keycode 0x26 = a A aacute Aacute" > xmodmap -e "keycode 0x1f = i I iacute Iacute" > xmodmap -e "keycode 0x1e = u U uacute Uacute" > xmodmap -e "keycode 0x20 = o O oacute Oacute" > xmodmap -e "keycode 0x14 = questiondown question backslash ssharp" > xmodmap -e "keycode 0x0a = 1 exclam exclamdown onesuperior" > # > ... I figured it out; one can create a dir and a file in it with the following syntax: /* to be placed into the (created) directory /Users/apitzm/Library/KeyBindings as file DefaultKeyBinding.dict */ { "~q" = ("insertText:", "@"); "~a" = ("insertText:", "á"); "~A" = ("insertText:", "Á"); "~e" = ("insertText:", "é"); "~E" = ("insertText:", "É"); "~i" = ("insertText:", "í"); "~I" = ("insertText:", "Í"); "~o" = ("insertText:", "ó"); "~O" = ("insertText:", "Ó"); "~?" = ("insertText:", "¿"); "~!" = ("insertText:", "¡"); "~<" = ("insertText:", "«"); "~>" = ("insertText:", "»"); "~m" = ("insertText:", "ñ"); /* ñ not working , why? */ "~M" = ("insertText:", "Ñ"); /* Ñ not working , why? */ } Only two keys are currently not working as expected, but I use the 'm' key + option-key to get ñ :-) matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub