From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 8 21:31:20 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EC89106566C for ; Mon, 8 Mar 2010 21:31:20 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id DE8758FC14 for ; Mon, 8 Mar 2010 21:31:18 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so15529qwi.7 for ; Mon, 08 Mar 2010 13:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=0qMkGzDdEIfBL0DRO8V2nwHtsr0G5n1OHsfmwzsOBog=; b=gw8etElNPI5aIs7dDw1hdAq4lFZzqOzc4jCnNBlCh3ytlA/38bAI60V0MB4nXzY38b qy/LNx8ePy/PIpMf38G2lZWBvdrgooxIb6ByozPByMUKWhpCH9zVB0df4xybWsYDjlaJ JkAPwEncks43Z4hH+VVhQxxFhbL1g0aZbSb+4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=WjIqGdr/Rjar3U4q2K/rYvZzCw7cVmOwweY+lHl2e1q6fisxKdtKyetmJSZpws2DPW EnW8FwF8i3Cj7+nXMdOuzriwEyW3Ri3EZrIr7rG0x3Z0xX6oM9NblGZtMp8PBhRrjJSO pOwSvh4Wk6dsJ3SehMXsC4cBK0E5QfinlbV8c= MIME-Version: 1.0 Received: by 10.229.240.4 with SMTP id ky4mr1744261qcb.35.1268082261796; Mon, 08 Mar 2010 13:04:21 -0800 (PST) In-Reply-To: <201003081702.o28H23MG056963@fire.js.berklix.net> References: <201003081702.o28H23MG056963@fire.js.berklix.net> Date: Mon, 8 Mar 2010 13:04:21 -0800 Message-ID: From: Maksim Yevmenkin To: "Julian H. Stacey" Content-Type: text/plain; charset=ISO-8859-1 Cc: hackers@freebsd.org Subject: Re: kbdcontrol: how to get us.iso on ukbd & en.iso on atkbd ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 21:31:20 -0000 On Mon, Mar 8, 2010 at 9:02 AM, Julian H. Stacey wrote: > Hi hackers@ > Am I missing something obvious, or is a bit more needed in man kbdcontrol ? possibly the later :) > What kbdcontrol[s] set an external USB keyboard (only) > to eg American (or German etc), while leaving internal in English ? well, it may or may not work, depending on whether you want or don't want to use both keyboards at the same time [...] > su > kbdcontrol -k /dev/ukbd0 -l de.iso > cannot open /dev/ukbd0: Device busy > setting keymap: Inappropriate ioctl for device > kbdcontrol -k /dev/ukbd0 -l de.iso < /dev/console > cannot open /dev/ukbd0: Device busy > kbdcontrol -A /dev/ukbd0 -k /dev/kbdmux0 > unable to obtain keyboard information: Inappropriate ioctl for device > cannot open /dev/kbdmux0: Device busy > kbdcontrol -A /dev/kbdmux0 -k /dev/ukbd0 > unable to obtain keyboard information: Inappropriate ioctl for device > cannot open /dev/ukbd0: Device busy > kbdcontrol -K < /dev/console > kbd1 > kbdmux0, type:AT 101/102 (2) > kbdcontrol -a ukbd1 -l uk.iso < /dev/console > kbd1 > kbdmux0, type:AT 101/102 (2) > kbdcontrol: unable to (un)mux the keyboard: Invalid argument well, you should be using keyboard name (not keyboard device node name) in attach/detach, i.e. something like % kbdcontrol -A ukbd0 < /dev/ttyv0 to detach ukbd0 from kbdmux. as you have realized, you can not do anything to a keyboard if kbdmux has control over it. so, you need to detach keyboard first. because kbdmux is essentially "master" keyboard if you set keyboard map on kbdmux, it will set the same keyboard map on all the "slave" keyboards. you might want to try - detach keyboard from kbdmux - set map on detached keyboard - reattach keyboard to kbdmux kbdmux does not set map on KBADDKBD ioctl(), so, in theory, it *might* work. also, please keep in mind that kbdmux will always set "slave" keyboard into K_RAW mode. thanks, max