Programming :: Handle Keyboard Button Pressed Signal?

Jul 4, 2011

I'm learning Signals, and I have a question:

Is possible to make a handle when I press any of the keyboard buttons?

The SIGINT handles the Ctrl-C combination, but I want to handle if any keyboard button was pressed.

View 3 Replies


ADVERTISEMENT

Hardware :: Boot - Down Button Remains Pressed ?

Sep 13, 2010

When I boot, apparently any Linux (Ubuntu and CloneZilla), I see the letters Code: ^]]B scroll pass, over and over again. This represents the down key as when I try to do anything the down key is held down. This occurs during boot on Ubuntu (once I get to the login screen it stops and does not happen). This does not happen at the GRUB screen or in Windows. It also occurs during the entire CloneZilla process and Ubuntu alternative install process (making both of these impossible)

I can't find any reason for this to happen and have been using both CloneZilla and Ubuntu for a long time before this happened. Does anyone know what I could try to fix this.

Ubuntu no longer boots.

View 9 Replies View Related

Hardware :: Old Emachines Does Nothing Except When The Power Button Is Pressed?

Jul 1, 2011

A friend of mine has an old emachines with XP on it and at first it would complain it had to test the disk and turn off in less then a minute. Now it won't do anything except run the power supply and cpu fans while the start button is pressed. I checked for power on the blue , purple ,red and orange wires while 14 and 15 were jumped on the power supply. There are no lEDs on the board and no beeps. I disconnected all the peripherals also

View 11 Replies View Related

Ubuntu :: Change Shutdown Time When Power Button Pressed?

Jun 1, 2010

I am currently using a Ubuntu Netbook Remix 9.04
When I press the power button, I see a dialogue box which asks for confirmation and if nothing is confirmed system automatically shuts down in 60 seconds.
I want to change this time of 60 seconds to say 30 seconds. Is it possible? Also is there a way to hide that dialogue box...

View 1 Replies View Related

Ubuntu :: Power Management Shutdown / When Suspend Button Is Pressed?

Jun 25, 2010

I have a dell zino inspiron media pc with Ubuntu 10.04 installed. I am able to shutdown using the power button on machine i.e. System->Preferences->Power Management option 'when power button is pressed': choose 'Shutdown'.But for option 'when suspend button is pressed', I only get 'Suspend' or 'Hibernate' in the drop-down. Where is my 'Shutdown' option?I really want to be able to shutdown my machine from my wireless keyboard!

View 1 Replies View Related

General :: Make LXDE Hibernate The Computer When The Power Button Is Being Pressed

Dec 31, 2010

How to setup LXDE (a linux desktop environment) to hibernate a PC after the power button on the computer is pressed?

View 1 Replies View Related

General :: Create A Signal Handler Thread To Handle SIGALRM Signals?

Jan 19, 2010

I'm trying to create a signal handler thread to handle SIGALRM signals. The main thread calls the following function before creating any other threads

Code:

pthread_t Timer::Init(long _clock_interval_musec)
{
// Set interval.
clock_interval = _clock_interval_musec;
// This is called while in a single threaded environment.

[code]....

clock_interval is 50.

Is the timer not firing? Did I not set my interval correctly? Did I not proper block the signals ensuring the that the default handler would not take care of them?

View 7 Replies View Related

Ubuntu :: At The Same Time It "blocks" The Mouse Left Button In The 'pressed' State?

Nov 2, 2010

I have a Microsoft Wireless Desktop 3000 (Wireless Keyboard 3000 + Wireless Mouse 5000), actually, I have two of them, one in this computer, running Ubuntu 10.10 and another one in a box running Ubuntu 10.04.In the box running 10.04 I can perfectly use 70% of the hotkeys the keyboard has, the 30% left I guess they're not compatible, but that's not a problem.In the one running 10.10 whenever I use a hotkey,t works, but,sametimet "blocks" the mouse left button in the 'pressed' state. Let me be more clear, it's like I'm holding down the left click all the time and I don't ever release it. Unless I restart the system, I can't recover the left click.

View 3 Replies View Related

Programming :: BASH: Detecting CTRL+C Being Pressed?

Jan 28, 2010

I am working on a script and I want it to detect if CTRL+C is pressed at any time during the script and have it not Break the script and display a message stating to use CTRL+Z instead. How can I do that?

View 9 Replies View Related

Ubuntu :: What Happened To The "Do Nothing" Option For "When The Suspend Button Is Pressed" In Lynx

Apr 30, 2010

What happened to the "Do nothing" option for "When the suspend button is pressed" in Lynx? It would also be useful to have a "Do nothing" option for "When the power button is pressed".

View 2 Replies View Related

Ubuntu Installation :: Won't Start - No Viedo Signal - Keyboard Has No More Lights

Oct 27, 2010

I burned ubuntu-10.10-desktop-i386.iso with no problem, the installation start and i can choose the language (italian), select "Install" and.... it dies!

No viedo signal, keyboard has no more lights... nothing works but the pc is still power on.

My CPU is an AMD SEMPRON 2200+, 1gb ram, 250gb hdd with an nvidia graphic card.

View 1 Replies View Related

Programming :: Totem Python Plugin Programming: Any Signal For Video Mouse Click?

Feb 9, 2011

I want that I click with the mouse on the video, it paused.I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":

Code:
vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)

[code]....

View 3 Replies View Related

Software :: Using Keyboard Key As Mouse Button?

May 7, 2010

The mouse buttons on my machine are frustratingly loud, unreliable and hard to press down. (the touchpad thingy that *moves* the mouse works great though)

I would like to map a certain (unused) keyboard key I have, to do the job that the left mouse button does (i.e. the opposite of what tons of mouse-keyboard mapping programs do).

I'm open for suggestions on how to accomplish this, but I would prefer using xmodmap, possibly in conjunction with xdotool. Thus, I need someway to map events as follows: (button1=leftmouse; keycode123=keyboard key alternative)

KeyPress 123 ---> ButtonPress Button 1
Keyrelease 123 ---> ButtonRelease Button 1

Compiz is also a great way to map stuff to xdotool commands, but it doesn't handle separate KeyDown/KeyUp event.

View 7 Replies View Related

Debian :: Power Button On Keyboard Not Functioning

Jun 27, 2015

I recently upgraded to Jessie and am using the LXDE desktop. I like using the keyboard power button to shutdown the system but it does not work. I looked at /etc/acpi and everything appears okay to my untrained eyes, but there is obviously something not working correctly. Do I need to edit some config file or install some code in order to use the power button for shutdown ? When I look at Services Settings I see that acpid power management is selected.

View 10 Replies View Related

Slackware :: Enable Keyboard Power Button?

May 21, 2011

Is it possible to turn off the computer (Slackware 13.37 Box) simply using the power button on the keyboard

View 7 Replies View Related

Programming :: How To Handle Division By Zero In Awk

May 29, 2011

Sometimes the variables will be 0 and sometimes not, and of course the output may also be 0%...What is the best method to handle division by zero errors in awk.

View 2 Replies View Related

Ubuntu :: Keyboard Responding After 2sec Of Pressing A Button?

Jan 17, 2010

Yesterday night everything was normal until I rebooted to Fedora. This morning I switched back to Kubuntu 9.04 and the keyboard had a strange behaviour. Every button needs to be pressed ~2 sec. in order the letter to show up. And that happens in every application (shell, firefox, etc). I tried to upgrade to 9.10 hoping that it will return to defaults but the problem persist. Please help solve this issue, my work is hanging and all the programs I'm using at the moment are installed on my Ubuntu partition.

View 4 Replies View Related

Software :: Keyboard Power Button To Shutdown Computer?

Jul 8, 2009

I have a Genius K627 Keyboard with Power, Sleep and Wake buttons. ACPI is unsupported on my computer, but it can turn off its power supply when the system halts (PM is ok). I would like to bind the Power key on the keyboard to execute the /sbin/halt command. What I already know is that I can specify an event in inittab (kbrequest) that would execute a command. What I don't know how I can make my system receive pressing Power button as a kbrequest. The scancodes of Power button on the keyboard (by showkey): 0x74 0xf4

This is the line I was talking about in my inittab:

Code:

ce:12345:kbrequest:/sbin/halt

I think I should edit /etc/console/boottime.kmap.gz but don't know how I could insert this scancode into it.

View 8 Replies View Related

Programming :: C++ Search And Handle Information

Sep 26, 2010

I would like to make program that reads a *.TXT file and searches for last line and constatly refreshing the search. So last line would look something like this:Mike Had A 100.0 Pound Shark.So there are multplie category of "fish"(Shark, Dolphin, etc.) and each of them have allowed weight (ie. minimum 70.0 Pound Shark, 50.0 Pound Dolphin). If in the found sentence Shark or Dolphin doesn't meet requierments than program named False.exe should be started. I dont know how to make it my self so any help is much appreciated. My knowledge on programming is very low but I'm opend for learning.

View 1 Replies View Related

General :: Remapping Keys On Keyboard - Map A Specific Button To Xkill?

May 16, 2011

I am currently using xmodmap for remapping keys like Caps Lock on my keyboard.However, my keyboard has a bunch of keys on the top that are rarely used (Multimedia keyboard with buttons like Internet, Music, Next song, Mute etc)I want to remap these keys to specific commands (Not keys).

For example: Pressing the Internet button should fire up my Firefox (/usr/bin/firefox)(which happens only in Windows for me)Also I need to map a specific button to xkill.

View 2 Replies View Related

Ubuntu :: Keyboard Shortcut That Mimics The 'win' Button Operation In Windows?

Jun 27, 2011

Is there any keyboard shortcut that mimics the 'win' button operation in windows?got it..i should search a bit before asking..

View 3 Replies View Related

Programming :: Firefox Extension To Handle URLs?

Jan 11, 2011

I want to write simple firefox extension / script or anything to change URLs from HTTP to HTTPS for selected websites (e.g. facebook). That thing is actually bypassing some security checks in my network.

Can anyone tell me how to proceed? I can deal with language as far its C++ or Python (something else would just take more time that's all )

View 1 Replies View Related

Programming :: Form To Submit Csv File To Handle?

Jul 25, 2010

I'm new to php and need some pointers to worth while documentation 'cause I'm getting nowhere I want to make a simple html form that allows me to submit a csv file so that I can work on it.The problem seems to be that if the file is not in the root of the (web) application it won't work.The form doesn't seem to send the path with it so I am unable to (1) know where the file is, I just get the name of the file and (2) I couldn't access the file anyway as it's outside of the apache environment.Is there a way to up the file to memory? How would you do this

View 3 Replies View Related

Programming :: Handle Query Strings Using Socket?

Dec 7, 2009

I need to make a daemon which listens to port 81 for messages like [URL] So far I made a daemon which serves as a simple stream server: I set up a socket to listen to a non-reserved port (like 9999), but I don't know how to read the query strings.

Linux distro: Kubuntu 9.04
Language: C

View 5 Replies View Related

Programming :: Limit In Number Of Fields That Awk Can Handle

Mar 2, 2011

I have a file with 200 000 lines and I want to append the fields of each line based on matching first field. The resulting file should have 70 000 columns but has "only" 18 000. The command I'm using is working perfectly with a smaller file, wich lead to 14 000 columns. Could there be a limit in number of fields that awk can handle ? Here's my awk command :

Code:

awk -F, 'END { for (k in _) print _[k] } { _[$1] = $1 in _ ? _[$1] FS $4 : $1","$4 } ' file > out

Also, this command writes ^M (windows line break) after each columns. Removing them is easy but where do they come from ? Working on Ubuntu 10.10

View 4 Replies View Related

General :: Keyboard Function Button That Corresponds To Wireless Doesn't Work

Aug 28, 2011

I want to install Linux on my laptop. I started with Arch but 4 hours later, I'll take anything so now I'm trying Ubuntu.It appears that the keyboard function button that corresponds to my wireless does not work, and perhaps is windows dependent?Every time I try to interact with wlan0, I get the error "Operation not possible due to RF-kill". And as I've looked around online, it has been suggested in other forums that the only way to resolve this is to reinstall windows and dual boot, so the FN key will work.

I think this is ridiculous. There must be a way to persuade the RF-kill to be turned off again, shouldn't there?I don't have a recover disk for this laptop and I don't want to go through the trouble of requested one from acer. I reformatted the whole disk while attempted to install arch.

View 1 Replies View Related

Ubuntu :: Plain Text File - Enable The Zoom Button On The Keyboard

Mar 21, 2010

I just downloaded a Plain Text File that contains (what appears to me as) code that will 'unlock' functions of my MS keyboard, now what do I do with it? Here is a preview of some of the contents of the file from the beginning of the text.

[Code]....

.....and so on with different items. My goal in doing this was to enable the zoom button on the keyboard.

View 1 Replies View Related

Ubuntu Networking :: Cannot Switch The Wireless On As The Button The Keyboard No Longer Functions?

May 10, 2010

I installed Ubuntu 9.10 on a new acer emachine e525. All is fine except that now I cannot switch the wireless on as the button above the keyboard no longer functions. Can anyone tell me what I can do to fix this as wireless is obviously vital in a laptop. BTW the wireless waqs working fine while the machine had Vista on it.

View 2 Replies View Related

Ubuntu :: Highlight Something But Paste With A Keyboard Shortcut Rather Than Middle Mouse Button?

Nov 18, 2010

Is it possible to highlight something but paste with a keyboard shortcut rather than the middle mouse button?

View 1 Replies View Related

Programming :: Bash Script Can't Handle Errors When Run By Cron

Jan 8, 2009

I have a script that that is supposed to send me an e-mail when a host is not responding to ping:

The script works fine when I execute it directly but when cron executes it, the ping error is never picked up by the script so the if statement is ignored.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved