General :: Check The Status Of Mouse-button/ A Key Press Using C ?
Jun 23, 2011
1) check if a mouse button is pressed down. I need to check this status of mouse button again and again inside a loop. Depending on the status, some function will be called. OR
2) check if some key of the keyboard is pressed down. I need to check this status of 'key' again and again inside a loop. Depending on the status, some function will be called.
openSuse 11.4 64bit fresh install, KDE 4.6.0. Now I am probably being obtuse, but If I click on the wonderfully named "My Computer" I get, among other things, a display of Disk Information; hard drive partitions and any DVDs or CDs. If I let my mouse cursor alight on any of these, I get a message "Press the right mouse button for more options (such as Mount or Eject)" But if I press the right mouse button, I don't get those options; I get a message "Open in new window, Open in new tab, Open with ..., Create file project with K3b, and Compress ...".
Is it possible to have the power button emulate the press of a key? On my media centre I have XBMC running and it doesn't recognise me pressing the power button. If I press S (on the keyboard) the shutdown menu pops up.
I know how to make another button act as the middle button but how can I map several mouse buttons to the middle button? xmodmap complains if I repeat button numbers in the pointer option.
It seems that they are not shown under xev ...Someone knows if old scanner, can be detected in terms of button pressing ?[URL]button pressing does not show up into deamon.log
After a fresh installation of Ubuntu 10.10 I uninstalled empathy (im using skype). The empathy menu in the evolution indicator was gone after that.I also uninstalled gwibber. But the gwibber status indicator remains within the about-me panel... Uninstalling the gwibber package also removes the me-menu which I want to keep actually. Especially the shutdown/restart... part of it. See attachment.I know there is a shutdown panel-app...but its butt-ugly and it doesnt allow to logon/off.
In another thread I read that the gwibber status shouldnt be there if no account for it is configured... which it is not... I do use ubuntu-one though which is in the same menu... I saw that this issue was addressed at some bug report before, but not fixed yet...
Does anybody know a good workaround to get rid of the gwibber status in the panel while keeping the about me and the shutdown button?
While searching the net I found how to complete disable the functionality of the middle mouse button but I need this button for many other uses.I want to disable only it's paste action.
I'd like to use a webmin to execute scripts as the picture. When I press "Stop friendly" button, it will execute the script that is located at /home/kenzo/stopfriendly.sh or it will execute /home/kenzo/stopserver.sh when I press "Stop" button.
i use ubuntu 10.04.its working quite normally.i installed ubuntu tweak and compiz fusion etc.For a few days i didn't have any problem.but after some time in the case of ubuntu tweak,i am unable to press the 'unlock' button.its as if its freezed or something.nothing will happen.in the case of compiz fusion i am unable to change its settings and change the effects.the software center application which is one of the default applications, i am unable to install a thing.the install button there is also freezed.like wise i think my super powers have gone automatically.but when i checked the users and admin settings i still have the super powers and i am the administrator.so i deleted that user and made an another user.
Is there a button I can press when booting to log into a 'safe mode' ? Like f5-f6 does on windows? Or a command prompt? My ubuntu fails when it loads X and cant get out of it, is there something I can do to allow me to log into the system to see whats the problem or revert it back to the old settings?
My Update Manager stopped working for last three weeks. When I press button INSTALL UPDATES in Update Manager, nothing happens just Reading packing information is executed and when it is finished nothing continues,so nothing I chosen is installed. I have tried to fix broken packages in Synaptic Manager, but no change.
I am a new user of ubuntu and have found that the Update Manager freezes when I press Install Updates button. what to do next as I am way behind with the updates.
I just upgraded to FC14 (64) from FC13 (32) and the mouse middle button (simultaneous left+right button) paste function has stopped working. I tested it with 3 makes/models of different mice and trackballs. For some reason (left+right) mouse returns the same code as the single right-button ('xev' value = 3). This worked in all previous FC and RH distros I've used in the past. Did a default setting get zonked somewhere? System: Toshiba laptop w/ USB mouse.
CNEE(1) General Commands Manual says this. RECORD OPTIONS --first-last Print only first and last of multiple successive MotionEvent. So I try this. my test window is Calculator 3.14.1 cnee --record --mouse --keyboard --time 5 --store-mouse-position --first-last --stop-key h -o xnee.xns -e xnee_record.log -v;The result is, xnee.xns lists every mouse movement.But I only need to record the mouse location when there is a mouse button event. it seems --first-last does not work. How can I make it work?I use
hardware HP pavillion 20. The only avalible resolution is 1600x900. /etc/debian_version 8.1 GNOME Terminal 3.14.1 xnee 3.19
At work I've got a HP LaserJet P1505n printer that is used as network printer. It has an ethernet port and is plugged in directly into the network. Everybody in the office is using Windows and has no problems working with it. After a few hours of google-ing, I also managed to set it up with CUPS as a LPD printer, with some problems: every time I send a document to it, it goes into the "error" state, and I have to press the "green" button for the printer to start printing. Is there a way to work around these errors? I tried to google for these kind of errors, but couldn't find anything useful.
Is there an option to hide and unhide hidden files inside nautilous with a press of a button?And without the need to browse the edit-preferences-etc all the time?
I just bought a new mouse - just a cheapie usb wheel mouse but it has an extra 'thumb' button which I thought I might as well set up to do something useful. I used 'xev' to determine the numbers that the OS had assigned to the buttons, and I found it wasn't quite what I was expecting:
left = 1 wheel-as-button = 2 right = 3 wheel-up = 4 wheel-down = 5 thumb = 8
I thought the right button would be '2' and the 'wheel-as-button' would be 3 - that's just how I've always seen them referred to in explanations, and I thought it was standardised. Not a big deal - the context menus still pop up when I click the right button so it all works ok. (And I just discovered the wheel-as-button does a 'paste' operation when it's clicked. Weird - I've never noticed that before...) But the thing that I find particularly odd: why is the thumb button assigned as '8'. What happened to '6' and '7'? Does the operating system assign these numbers, or are they built into the hardware in the mouse itself? Again, no big deal, I know I can remap the buttons if I need to, but I was just curious as to how this all works and google didn't help.
I have a Logitech ambidextrous trackball, with a left and right mouse button. The trackball device also has two smaller left and right buttons. I'd like to know how those two smaller buttons are addressed. Ultimately, I'd like to assign certain keystrokes to them, to make work faster. For example, ALT+<right arrow> moves a browser back one page. how to name these keys, or whether/how I should address this USB mouse. FWIW, I'm actually using it through the PS/2 mouse adapter, since that doesn't take a USB slot.
when I press sound +/- button of my keyboard this gui thingy appears on the middle of my screen. Its transparent black, there is a speaker icon on the middle of it this thingy; [URL] ps: I don't want to kill or close it, I just want to know what is it. Which process which software and how can I hack it
My hardware is a Gateway LT2104u netbook.Bought it today, took it out the box and installed the netbook version of Ubuntu.Now here is the problem.The touchpad works fine. I am able to move the mouse all over the screen, the keyboard works find too. The problem is with the mouse click. The clicks are recognized when I am in the 'overview screen'. For example I can click on firefox and it opens. However once firefox is open it does not respond to any clicks. Even clicks to close firefox.
I push Alt+f4 to close the program and then I can click into any other (or the original) programs, but once inside the problem replicates.The problem was present in the 'live cd' during install as well.Does anybody know what might cause this? The whole netbook is useless at this point since I need to click to pretty much do anything in most applications (the Terminal program is one of the few exceptions )
I am trying to use my Microsoft Optical Wheel Mouse (it has left button, right button and the wheel button) in Ubuntu 9.04.I would like to use the wheel button to perform the same task as backspace key in firefox browser and file browser. I have hunted around the net for the past two weeks and found many articles on imwheel and editing x11config files but they all are for 5 of 7 button mice. I have installed and used imwheel -c which tells me that it is "wheel: Left Button 6". However as a total beginner with Linux I am not sure what to do from here. I am hoping that someone would be kind enough to give me a reasonably detailed explanation of what I need to do. If someone could spend some time to list what files I need to edit and what I need to insert into them for this mouse I would be grateful.
I have a big problem with my openSUSE 11.2 32bit (but I have experimented the same error with other distributions), this problem consist in a temporarily freeze of my system after some seconds or some minutes if I don't move the mouse or I don't press any key... but when I move the mouse or press any key the system magically wake up and each applications begins to run from the point where was interrupted... this problem also affect on the system clock that loses every second that the system remain frozenMy computer is a notebook with: CPU Intel Core2 Duo T81004GB RAMGPU GeForce 8600M GT
4 of them are working fine, the application installed on 10.1.1.10 can query 4 servers but I got 2 Linux Centos that are in a DMZ, and my networking team already opened ports and configured NAT but the SNMP Server 10.1.1.10 is not able to query them how can I check the snmpd is really running apart from service snmpd status? might be related with the DMZ configuration?
I am an absolutely beginner with Linux (ubuntu). I got fed up with widows and decided it was time to go. I installed (clean install from a cd) ubuntu 10.04 on my desktop. It is an hp compaq d220 MT.It looks good and feels good, well at least for a while since it keeps crashing. The screen starts to flicker, goes black, and the only way to get it up and running again is to press the on/off button until the system powers off and restart.
i was just wondering if there was any way to make it only boot ubuntu from pressing a button at startup like f11 or something instead of coming up with a menu asking me to choose which operating system to boot.
want to know what is the cmd to ping/check the link speed or something like Network Info. If for server checking (Show information CPI info) is (cat /proc/cpuinfo ) (correct me if im wrong)
We have a Dell Poweredge 1750 server with 2 harddrives in RAID 1 running Debian Etch. Yesterday one of the hardrives stopped working but no error message appeared in syslog. The only indication was the amber LED diode. Is there a software way how to check that both disks are OK?