LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2016, 05:29 AM   #1
P.G.Krish
Member
 
Registered: Jun 2016
Distribution: Ubuntu
Posts: 64

Rep: Reputation: Disabled
Question what is the meaning xinput keystroke numbers?


Hi guys ,
When i heared about xinput usage from one of my friend. I tried its for recording my keystrokes

xinput list id 7

Here 7 is my keyboard id, Then its generate following value.When i press the key and released time.
I cant understand what the numbers indicates .I cant able to confirm this belongs to ascii or anyother things
Please help me understand this
key release 36
key press 43
hkey release 43
key press 38
akey press 31
ikey release 38
key release 31
key press 37
key press 54
 
Old 11-10-2016, 07:29 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
that is the number of the key to tell the system which key was pressed, and used for keyboard input from programming to KB shortcuts
it tells which state that key is in.
key release 31
key press 37
Code:
if KPress = 37 then do something
if KPress = 31 then do something
in programming you can have each state create an action, or use it to check the state the key is in. it is called feedback.
read for further information
http://xinput.sourceforge.net/

Last edited by BW-userx; 11-10-2016 at 07:35 AM.
 
Old 11-10-2016, 07:44 AM   #3
P.G.Krish
Member
 
Registered: Jun 2016
Distribution: Ubuntu
Posts: 64

Original Poster
Rep: Reputation: Disabled
Cool

Quote:
Originally Posted by BW-userx View Post
that is the number of the key to tell the system which key was pressed, and used for keyboard input from programming to KB shortcuts
it tells which state that key is in.
key release 31
key press 37
Code:
if KPress = 37 then do something
if KPress = 31 then do something
in programming you can have each state create an action, or use it to check the state the key is in. it is called feedback.
read for further information
http://xinput.sourceforge.net/

What my question is, how to find the original key by using this number
 
Old 11-10-2016, 07:59 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
Quote:
Originally Posted by P.G.Krish View Post
What my question is, how to find the original key by using this number
original key is the key you press while looking at its out put. it gets the out put off the key you are pressing. do you understand that logic?

Code:
userx@voided1.what~>> xinput test 10

key press   40 
dkey release 40 
key press   26 
ekey release 26 
key press   27 
rkey release 27 
dkey
ekey
rkey

first letter tells which key is pressed.


using xev pressing key r
Code:
KeyPress event, serial 37, synthetic NO, window 0x3e00001,
    root 0x49e, subw 0x0, time 7262190, (92,106), root:(417,373),
    state 0x0, keycode 27 (keysym 0x72, r), same_screen YES,
    XLookupString gives 1 bytes: (72) "r"
    XmbLookupString gives 1 bytes: (72) "r"
    XFilterEvent returns: False

Last edited by BW-userx; 11-10-2016 at 08:15 AM.
 
Old 11-10-2016, 08:08 AM   #5
P.G.Krish
Member
 
Registered: Jun 2016
Distribution: Ubuntu
Posts: 64

Original Poster
Rep: Reputation: Disabled
Wink

Quote:
Originally Posted by BW-userx View Post
original key is the key you press while looking at its out put. it gets the out put off the key you are pressing. do you understand that logic?
Its common to everyone or differ?

Last edited by P.G.Krish; 11-10-2016 at 08:15 AM.
 
Old 11-10-2016, 08:18 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
Quote:
Originally Posted by P.G.Krish View Post
Its common to everyone or differ?
it should be common uniformed key codes to each country and keyboard types
country has different key board mappings. Chinese do not use letters they use ideas (indicated by words by the use of symbols for each word or idea )

https://en.wikipedia.org/wiki/Britis...ican_keyboards


https://en.wikipedia.org/wiki/Keyboard_layout

http://scripts.sil.org/cms/scripts/p...d=keybrddesign

http://www.vt100.net/docs/vt510-rm/chapter8.html

almost forgot about OS's
windows vs Unix/linux

https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx

12.7 Keyboard Encoding

https://tronche.com/gui/x/xlib/input...-encoding.html

Last edited by BW-userx; 11-10-2016 at 08:26 AM.
 
  


Reply

Tags
keyboard, xinput


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xinput on RHEL 5.2 multi_touch Red Hat 1 09-18-2015 06:40 PM
[SOLVED] xinput as another user lopid Linux - Hardware 4 05-30-2014 02:52 PM
cisco ios: meaning of vty numbers stateless Other *NIX 2 03-27-2014 05:33 PM
[SOLVED] find the total of numbers that are higher than x in a text file with numbers (using awk??) Mike_V Programming 12 11-24-2010 09:51 AM
Meaning of numbers in rc.d startup links SlowCoder Linux - General 1 05-16-2008 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration