From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E9A7C158094 for ; Sun, 28 Aug 2022 02:58:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 927F6E084A; Sun, 28 Aug 2022 02:58:45 +0000 (UTC) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 57AFFE082B for ; Sun, 28 Aug 2022 02:58:45 +0000 (UTC) Received: by mail-qk1-f177.google.com with SMTP id b2so3928664qkh.12 for ; Sat, 27 Aug 2022 19:58:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:reply-to:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=FBXUcywbqjzGvjE3P6N0SA9Nluloshv+YZhfdDln2UU=; b=JbRyfNbdoUh1Dw9oXc2HggAufe53LRXAwcy/6hHOhru5P54s10XxrVLS5kvVj01O6D +u5fGg+Epwm4WWl7GmRt4ynj+XloDx76LsfrXbayBsBrZJVYF2yVh00jiyXAYu2PsQ4M i0F4g8WcMMLYqLY8XdL23ArbMhttUPRd2j2O5Vxd2tf648mCpn+XyAE5jCoVvflWipzH ZjcPLcL8wIDI1wJUFYs03MCvbAAWpg2o/YFvJ2IrbwZfjrQjI+Hi+vGTjECBfWg1HZxA mjI9MS9rY6h/Xr9Umm1wZml9xtWlgEJheTBgM5gCLVws/3mtieqhPtOVVxtgteICdAYi 5TZA== X-Gm-Message-State: ACgBeo3jsvpcvPYLyzhAyqn6NuoUoT1xOUBtcdUXD4XcDxqy3k1l8U1o q2FpGu7xmm6wLFCQy4OhnVb9yzHuyApsbw== X-Google-Smtp-Source: AA6agR5PxzMWtNjWUyFDD6qoaxw2LDRSArrI+WO/QH5ZJEEQK3hgvSL6ew6VvvNYD7wx8JLz1FyXBQ== X-Received: by 2002:a05:620a:170e:b0:6bb:d761:6c13 with SMTP id az14-20020a05620a170e00b006bbd7616c13mr4596508qkb.149.1661655524173; Sat, 27 Aug 2022 19:58:44 -0700 (PDT) Received: from [192.168.1.18] (c-73-238-129-126.hsd1.ct.comcast.net. [73.238.129.126]) by smtp.gmail.com with ESMTPSA id fy27-20020a05622a5a1b00b0033b30e8e7a5sm2605471qtb.58.2022.08.27.19.58.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 19:58:43 -0700 (PDT) Message-ID: <77914a79-7de4-80fa-3875-91b3dd218d4c@users.sourceforge.net> Date: Sat, 27 Aug 2022 22:54:24 -0400 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [gentoo-user] Software emulation of angled arrow keys on Lenovo Thinkpad? Content-Language: en-US-large To: gentoo-user@lists.gentoo.org References: From: Jack In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archives-Salt: 88e8df1d-51f9-4e0a-962e-db0e92150170 X-Archives-Hash: db162aef0bd6cef7beb198931fd504c6 At this point, I'm doing no better than guessing.  I'd suggest trying things.  I'd map the keycode of the keypress you want to use to the keycode of what the program seems to expect for that key. On 8/27/22 03:30, Walter Dnes wrote: > That's on a real numeric keypad. Meanwhile on the Lenovo Thinkpad > > left shift > > KeyPress event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25019825, (528,-50), root:(532,488), > state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25019913, (528,-50), root:(532,488), > state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > exit > > KeyPress event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25211416, (708,53), root:(712,591), > state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25211553, (708,53), root:(712,591), > state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > pgdn > > KeyPress event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25338798, (677,2), root:(681,540), > state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25338934, (677,2), root:(681,540), > state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > home > > KeyPress event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25427458, (880,-8), root:(884,530), > state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25427562, (880,-8), root:(884,530), > state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > pgup > > KeyPress event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25478798, (767,108), root:(771,646), > state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 38, synthetic NO, window 0xe00001, > root 0x256, subw 0x0, time 25478901, (767,108), root:(771,646), > state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > ################################################################### > > Is it possible to map {LEFT-SHIFT} plus End, PgDn, Home, PgUp to "real > keypad" 1, 3, 7, 9 respectively? If the {LEFT-SHIFT} is not being held > down, then the End, PgDn, Home, PgUp would have their regular meanings. > To be more specific, while "keycode 50 (keysym 0xffe1, Shift_L)" is in > effect (i.e. {Left}{SHIFT} is being held down)... I think the whole point of the mapping is to change the meaning of the keypress events to be recognized as something else.  You should be able to map the press with or without the LEFT-SHIFT.  From the little I understand, xmodmap can be easily appied/reversed - you may just need two files, one to make the changes, one to reverse them. Personally, I would just start trying stuff to see what works. > > {END} (aka down left) maps to "keycode 87 (keysym 0xffb1, KP_1)" > > {PgDn} (aka down right) maps to "keycode 89 (keysym 0xffb3, KP_3)" > > {HOME} (aka up left) maps to "keycode 79 (keysym 0xffb7, KP_7)" > > {PgUp} (aka up right) maps to "keycode 81 (keysym 0xffb9, KP_9)" >