public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jack <ostroffjh@users.sourceforge.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Software emulation of angled arrow keys on Lenovo Thinkpad?
Date: Sat, 27 Aug 2022 17:46:13 -0400	[thread overview]
Message-ID: <TXEI3SQV.O7HFKPEQ.BQP6C75W@BTZZNOF7.LP7QFGW4.I6VHOZE7> (raw)
In-Reply-To: <YwgQ9wvV9RVG3rhA@waltdnes.org>

On 2022.08.25 20:16, Walter Dnes wrote:
> On Wed, Aug 24, 2022 at 05:58:28PM -0400, Jack wrote
> 
> > Ah - I expect the game is interpreting keycodes fairly directly.   
> You
> > can use xev (or similar) to find what the various keys are currently
> > producing, and there must be some (Xorg related) program to  
> translate
> > them to whatever the program is expecting - perhaps determined by  
> using
> > xev with a "proper" keyboard.
> 
>   1..9 on a real keyboard numeric keypad.  The "XLookupString" line
> tells you which key is pressed.  I think the "keycode" entry is what  
> is
> being acted on by the game.  Google seems to indicate that setxkbmap  
> is
> what I need,  Once I emerge it, then what?
> 
> KeyPress event, serial 38, synthetic NO, window 0x1000001,
>     root 0x76b, subw 0x0, time 2031605618, (-448,387), root:(368,623),
>     state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
>     XLookupString gives 1 bytes: (31) "1"
>     XmbLookupString gives 1 bytes: (31) "1"
>     XFilterEvent returns: False

The XLookupString looks like the ascii for the character/digit.  The  
keycode does seem like what you want.  Googling "linux remap keycodes"  
should be a good start, but it looks like xmodmap is proabably what you  
want to use.  However, you also need to know the keycode of the key you  
want to remap.  Essentially, you need to remap whatever keycode your  
current keyboard is generating to that which the game expects for that  
key.  I'm not at all familiar with either program beyond browsing a few  
Google results, but perhaps setxkbmap is used for a major remap of  
most/all keys on a keyboard and xmodmap can be used for single or a  
small number of keys.


      parent reply	other threads:[~2022-08-27 23:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 12:16 [gentoo-user] Software emulation of angled arrow keys on Lenovo Thinkpad? Walter Dnes
2022-08-24 17:07 ` Jack
2022-08-24 21:21   ` Walter Dnes
2022-08-24 21:58     ` Jack
2022-08-26  0:16       ` Walter Dnes
2022-08-27  7:30         ` Walter Dnes
2022-08-28  2:54           ` Jack
2022-08-27 21:46         ` Jack [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TXEI3SQV.O7HFKPEQ.BQP6C75W@BTZZNOF7.LP7QFGW4.I6VHOZE7 \
    --to=ostroffjh@users.sourceforge.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox