Sponsored Content
Full Discussion: xlib and keyboard events
Top Forums UNIX for Advanced & Expert Users xlib and keyboard events Post 302721633 by DGPickett on Thursday 25th of October 2012 03:25:13 PM
Old 10-25-2012
Yes, but a tty solution works a it more simply, in an xterm or not. For the input side of your requirement, I do not see any requirement for X expertise to write such an app. Keeping things as simple as possible is usually a good thing. You can even script it:
Code:
$ stty raw -echo ; cat -uvte | line ; stty -raw echo
1234^M^C^D$
           $

There are good tutorials out there for just about everything: http://tronche.com/gui/x/xlib/input/
 

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How can I map Unix keyboard for PC keyboard

A Solaris AXI 440 machine with Solaris 8 version. I have PC users who use an emulation to login to the Solaris server. How can I change the keyboard mapping of the Sun keyboard to fit to the PC keyboard ? Any comment will be appreciated. Thanks (1 Reply)
Discussion started by: simhab
1 Replies

2. Programming

How to get capture input events from keyboard and mouse

Hi, Is there any way to capture/record the input events from keyboard, as well as from mouse using C. Thanks in advance (4 Replies)
Discussion started by: yhacks
4 Replies

3. Programming

Xlib mouse events and ButtonPressMask

I have written a simple program which will report key press and release events for a particular window. In my case, it is mostly the terminal since I invoke the program from the terminal. I am able to get the key press and release events taking place in the terminal window (I have used... (0 Replies)
Discussion started by: abhinav.zoso
0 Replies

4. UNIX for Dummies Questions & Answers

Problem getting vertical bar with British keyboard layout on US (physical) keyboard

Hi, I've got a bit of a ridiculous problem and wasn't sure where to post it. I need to use the vertical bar for piping in Bash but, as per the title, am using a UK layout on a US (physical) keyboard which doesn't have a key for it in the place I'd expect. I've tried using xbindkeys and Unicode... (7 Replies)
Discussion started by: crunchgargoyle
7 Replies

5. Programming

Xlib registering

hey, Im new to the linux world. Lately, I have tried to create a glx window with xlib, making it a popup window(fullscreen) so I set override_redirect to true. Im happy with the removed borders, but apparantly, the application doesnt show up in the left bar in ubuntu, neither when I press alt... (4 Replies)
Discussion started by: thedardanius
4 Replies
cbreak(3XCURSES)					  X/Open Curses Library Functions					  cbreak(3XCURSES)

NAME
cbreak, nocbreak, noraw, raw - set input mode controls SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int cbreak(void); int nocbreak(void); int noraw(void); int raw(void); DESCRIPTION
The cbreak() function enables the character input mode. This overrides any previous call to the raw() function and turns the stty flag ICANON off. The nocbreak() function sets the line canonical mode and turns the stty flag ICANON on without touching the ISIG or IXON flags. The noraw() function sets the line canonical mode and turns the stty flags ICANON, ISIG, and IXON all on. The raw() function sets the character input mode and turns the stty flags ICANON, ISIG, and IXON all off. This mode provides maximum con- trol over input. It is important to remember that the terminal may or may not be in character mode operation initially. Most interactive programs require cbreak() to be enabled. RETURN VALUES
On success, these functions return OK. Otherwise, they return ERR. ERRORS
None. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getch(3XCURSES), halfdelay(3XCURSES), nodelay(3XCURSES), timeout(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5), termio(7I) SunOS 5.10 5 Jun 2002 cbreak(3XCURSES)
All times are GMT -4. The time now is 03:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy