From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 14 17:13:46 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE6BD75D; Thu, 14 Aug 2014 17:13:46 +0000 (UTC) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3D0822AE; Thu, 14 Aug 2014 17:13:46 +0000 (UTC) Received: by mail-ig0-f178.google.com with SMTP id uq10so5650030igb.5 for ; Thu, 14 Aug 2014 10:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=CxxfUA6+wi6ivXDY3dJY9RnliCz/lRH/KO+/aNJjEA0=; b=d0Tp6SVm7izYv3uRMLMLS1+0n7QjR9i23oeX+H8Wq/BWq3xN7la1qrC10+B3vvUm/5 UJa1rZZyIeNi9fISm3gkHlppsq3HEuoVj9fjXgAWMta/S8upbn8GT0Fvmy/7Mh27qG69 udiJJCE4NeYKHk+B7WdyLbbRipYLEWeEiJfWQsKV2dEC8eQ8KBgV/od0a5eUdYbDNJhY V9YIKP/EjeSmHMeU7FZ8j5AOwwz8hzWS8b5JeDKq14Q0yRkwj5wZIEAdS6zCCYjHPLoY ijwG9J3icsFl6KpS5hD6kAIjGoie+DdiCpwdsVoAypnInfoP4xSs3XI0P0Zq1x8ljmv8 hpAw== X-Received: by 10.50.73.198 with SMTP id n6mr19010097igv.11.1408036426049; Thu, 14 Aug 2014 10:13:46 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.131.38 with HTTP; Thu, 14 Aug 2014 10:13:25 -0700 (PDT) In-Reply-To: <53ECA9CE.3070106@freebsd.org> References: <53EA0EC2.2070601@freebsd.org> <53EA1E5A.5020707@FreeBSD.org> <53EA2D00.7010307@freebsd.org> <53EB0DA0.5000305@freebsd.org> <53EBEDC8.3080303@freebsd.org> <53ECA9CE.3070106@freebsd.org> From: Ed Maste Date: Thu, 14 Aug 2014 13:13:25 -0400 X-Google-Sender-Auth: sTicM9JUp0YE0YVLpJkElVCH8V0 Message-ID: Subject: Re: Keymap definitions for VT / NEWCONS To: Stefan Esser Content-Type: text/plain; charset=UTF-8 Cc: "Andrey V. Elsukov" , Aleksandr Rybalko , "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 17:13:47 -0000 On 14 August 2014 08:21, Stefan Esser wrote: > There probably won't be a 1:1 mapping for all cases, but I think > that there is value in going for a regular naming scheme. > > We can use "fr.kbd" as a short form of "fr_FR.kbd", but there > will be a "fr_CH.kbd" and possibly a "fr_CA.kbd". The "fr" in > the short form will correspond to the "FR" in "fr_FR.kbd", > which is hidden by the fact, that both parts read "fr". I agree that consistency is a useful overall goal, and I don't have a very strong preference for the short names, it just seems to me to map well to what it seems users actually call the keyboard layouts. French, Swiss French, and French Canadian keyboard layouts in these three cases. Also, Linux console setting seems to generally use 2-letter names as far as I can tell. Would every locale we support have either a file or symlink? Or only a subset, roughly equivalent to what's provided by the syscons keymaps today? > But look at "uk_UA.kbd", which will be short-named as "ua.kbd", > or "be_BY.kbd" mapped to "by.kbd" versus "nl_BE.kbd" mapped to > "be.kbd". > > For some language/country combinations, the short form ends up > in a distant location to the long form names. But I expect most users would choose from a menu without seeing the underlying keymap filename anyway, so I don't think this matters much. > And will there be a "ch.kbd" for "de_CH.kbd" (the majority of > Swiss users will use that keymap), or will they all be of the > form "??_CH.kbd" ... ??? I would assume ??_CH.kbd since I suspect users would generally not refer to a "Swiss" keyboard layout, but rather a "Swiss German" or "Swiss French" layout. (I'm happy to be corrected if wrong.) > For all these reasons I think the short form serves no real > purpose. If you want to support it, you could symlink a short > name to the locale based name (to allow the use of just the > country code, if people edit rc.conf by hand, while I'd expect > the installer to use the locale based keyboard names). If we do end up with locale names I don't think there's much value in having short name symlinks. It's just another level of indirection that needs to be kept up to date. > I think this should be implemented in time for 10.1, if at > all possible. Indeed, that is exactly why I wanted to move ahead with the "trivial" cases, even if they turned out not to be so. I'm sorry for the conflict that caused with your work in progress. > Most users will either use the installer (and will thus > never see the locale IDs) I think we agree that for these users it makes very little difference what the keymap name actually is, since they won't see it. > or they'll manually edit rc.conf and will know their way. And in this case I think the country codes are often the way these users think of a layout, with a few cases where more specific names are needed. For example, I wouldn't think of a US English keyboard, but just a US keyboard, and similarly for a French keyboard. I would not expect to look for a Canadian English keyboard, but would look for a Canadian French or Canadian Bilingual keyboard. > And then it's easier to mechanically > put the locale ID in to the keyboard selection variable, > instead of thinking about (or looking up) whether this is > a country that does not need the full locale ID to select > a keymap. But then we either need to provide symlinks for all locale names, or the user needs to determine if their locale is one which has a keymap or not. And there may be ambiguities in the "default" symlink mapping; for instance, there are arguments to be made to symlink en_CA to either en_US or fr_CA. > In Europe, you'll often need the locale name, > not only the country. We don't seem to have many cases of this in the existing syscons keymaps, but you certainly understand this better than I do; perhaps this will be an issue when adding more keymaps. > I really think we'll regret using anything but locale names > for keymaps, and I'd want to rename those that you committed > under 2-letter ISO names. Is that acceptable to you? The worry I have with using locale names is that it implies there is a 1:1 mapping, which is sometimes true and sometimes not.