02-06-2017
Monitor keypresses without focus?
Hi all,
I'm new to Linux, been at it a couple weeks. I have written a script that basically acts as a watchdog to ping a server on a set interval, make sure chromium-browser is running, and a couple other things (it displays data via web browser). I'd like to make it stop the script when I hit Esc. I have figured out how to do that except for when chrome is in the foreground. Is there any way I can get around this with scripting? Any help appreciated!
Oh, using Fedora 25, Xwayland disabled(using Xorg), if that matters (my understanding of the various components in windowing is still murky)
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all,
Is there a way to make sawfish window manager focus on a gui when you click it but not make it raise to the top? I know that motif and CDE (soalris) allow you to focus with out raising the windows. THANKS (2 Replies)
Discussion started by: larry
2 Replies
2. Shell Programming and Scripting
Hi, i found xte and xdotool for sending some keys to windowed applications but they need to have the focus on it.
Can someone say me if i can do the same but wihtout focusing the window i want to type something ?
edit: xreplay (0 Replies)
Discussion started by: linked
0 Replies
3. Programming
Is this possible to be done with C++ ?
I am working on Qt Creator by I didn't find any working setFocus function or something. Can you help me a bit?
Thank you.
The program actually checks if there is a process of this program already running and if there is it exits.
I want to make it focus on... (2 Replies)
Discussion started by: hakermania
2 Replies
4. UNIX for Dummies Questions & Answers
Hi all
I have a java program I'm starting in Mac os from the terminal using the command
java -Djava.library.path=/Users/me/Desktop/Cfiles/DynamicCTGLayout/build/Release -jar
However, when I do this, my current program I'm using becomes "deselected" and the java program's GUI becomes... (2 Replies)
Discussion started by: WhiteTiger
2 Replies
5. UNIX for Dummies Questions & Answers
Please Help a Newbie,
I'm using the display command to post a picture of several configurations for a machine operator to choose from. The Issue I have is when I display the image the displayed image steals focus from my bash window. The operator then has to re-select the window to answer the... (1 Reply)
Discussion started by: BitBoy
1 Replies
6. What is on Your Mind?
In the fall I am taking courses in System Admin and Networking Admin, along with Cisco classes. Sometime next year I hope to get Red Hat and CCNA certifications, then try to get some experience and a job.
I am wondering what I can focus on in the meantime (and in my spare time) that will... (1 Reply)
Discussion started by: ScottLew
1 Replies
7. Infrastructure Monitoring
Sorry if this is the wrong forum
Searching for Saas Monitor service which monitor my servers which are sitting in different providers .
This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard.
The info I need is CPU / RAM / my servers status (... (1 Reply)
Discussion started by: umen
1 Replies
LEARN ABOUT CENTOS
xisetfocus
XISETFOCUS(3) XISETFOCUS(3)
NAME
XISetFocus, XIGetFocus - set or get the device's focus.
SYNOPSIS
#include <X11/extensions/XInput2.h>
Status XISetFocus( Display *display,
int deviceid,
Window focus,
Time time);
Status XIGetFocus( Display *display,
Window *focus_return);
display
Specifies the connection to the X server.
deviceid
Specifies the device whose focus is to be queried or
changed.
focus
The new focus window.
focus_return
Returns the current focus window.
time
A valid timestamp or CurrentTime.
DESCRIPTION
XISetFocus changes the focus of the specified device ans its
last-focus-change time. It has no effect if the specified time
is earlier than the current last-focus-change time or is later
than the current X server time. Otherwise, the
last-focus-change time is set to the specified time.
CurrentTime is replaced by the current X server time).
XISetFocus causes the X server to generate core, XI and XI2
focus events.
If the focus window is None all keyboard events by this device
are discarded until a new focus window is set. Otherwise, if
focus is a window, it becomes the device's focus window. If a
generated device event would normally be reported to this
window or one of its inferiors, the event is reported as usual.
Otherwise, the event is reported relative to the focus window.
The specified focus window must be viewable at the time
XISetFocus is called, or a BadMatch error results. If the focus
window later becomes not viewable, the focus reverts to the
parent (or the closest viewable ancestor. When the focus
reverts, the X server generates core, XI and XI2 focus events
but the last-focus-change time is not affected.
Attempting to set the focus on a master pointer device or an
attached slave device will result in a BadDevice error.
XISetFocus can generate BadDevice, BadMatch, BadValue, and
BadWindow errors.
DIAGNOSTICS
BadValue
A value is outside of the permitted range.
BadDevice
An invalid device was specified. The device does not
exist or is not a appropriate for the type of change.
BadMatch
The window is not viewable.
BadWindow
A value for a Window argument does not name a defined
Window.
03/09/2013 XISETFOCUS(3)