Programming :: Java Needs To Quit If No Keyboard Input For Several Seconds
Mar 29, 2011
I've got a program that takes keyboard input with BufferedReader and readline(), but readline() is blocking so I can't increment any sort of counter to quit the application after a period of inactivity, because the program is just waiting for an input from readline(). Do I need to create multiple threads, where one thread counts down an inactivity timer, or is there some method of using non-blocking keyboard inputs?
View 1 Replies
ADVERTISEMENT
Jun 28, 2011
has bash a command that reads the keyboard status and exits? I want to write a loop of this form:
Code:
while [ 1 ] do
sleep (1)
[code]....
View 14 Replies
View Related
Jan 25, 2011
I have a C program that may finish in seconds or weeks depending on the data. For the longer jobs I want to be able to press a key and get an intermediate result printed.
View 14 Replies
View Related
Jan 20, 2009
I have this little shell script which copies file names taken from inputfile:
Code:
while read line; do
cp -i $line something
[code]...
View 4 Replies
View Related
Mar 21, 2010
I've Fedora 11 64-bit with Sun java SDK 1.6.0_18 and when quitting eclipse, the GUI window will be gone, but the process eclipse and java that it instantiates will not die. Subsequent execution of eclipse just creates new eclipse and java processes, taking up more memory. It doesn't matter whether I run from the command line or from the gnome menu.I tried both Fedora packaged eclipse-platform-3.4.2-20.fc11.x86_64 and the manually downloaded Eclipse Galilio, with the same problem. I tried removing ~/workspace/, ~/.eclipse and also tried -clean option, but still no go. I also have ~/.eclipse/org.eclipse.platform_*/configuration/config.iniosgi.bundlefile.limit=100 as explained in other threads which solves the start problem, but it has no effect for stopping.l -9.
View 1 Replies
View Related
Apr 3, 2010
I'm trying to execute some actions when there's no keyboard action in "x" seconds or minutes (after "x" seconds or minutes of keyboard inactivity), but is hard to find something about this...
and i don't know if this will make a lot of cpu usage
View 4 Replies
View Related
Jan 6, 2010
I have no idea why but my keyboard suddenly stopped working in X when I started my computer this morning! The keyboard still works fine in the command line mode, though, so I can do stuff as long as it does not involve a GUI. (NetworkManager only works in X).
View 7 Replies
View Related
Nov 30, 2010
Two days ago, the down arrow cursor key quit working on my usb keyboard. I could go up, or left and right, but not down. I figured the key was broke and pulled out a PS/2 keyboard and plugged it in. Problem seemed to be solved.This morning, the down arrow cursor key again was not working. I thought that was a weird coincidence, so I plugged in the old usb keyboard, and the down arrow cursor key was again working!
View 7 Replies
View Related
Oct 11, 2010
I would like to watch a baseball game on TV, but listen to the radio broadcast. The TV is about 10 seconds behind the radio, though.Does anyone know a way to delay the input from my radio by 10 seconds and output it again to the speakers? I can do this on Mac OS X or Linux (or even Windows). I have Audio Hijack Pro, but there is no such effect.
View 2 Replies
View Related
Mar 24, 2011
Keyboard Hanging, in CentOS. Some time when I login to Linux or when we come back to use Keyboard after a long time work with mouse, my keyboard will hang for few seconds. I don't know its my USB keyboard problem or another issue. I doubt it started after I install opera browser in CentOS or by VNC setup.
View 3 Replies
View Related
Sep 9, 2010
My problem is that for an encrypted server my client blocks after I send the QUIT command to the server and I do not know the reason why my client blocks.
Language C, Library openssl, IP4.
Compiler: gcc.
Output:
send: STLS
receive: +Ok ssl handshake
send: USER XXXXX
receive: +OK
send: PASS ***
receive: +OK
Send: STAT
receive: +Ok 0 0
send: QUIT
receive: blocks
At this point I need to use crtl^C to exit the program.
For the non-encrypted mail client everything works fine.
View 1 Replies
View Related
Feb 11, 2010
I know it is possible, and I have been trying everything I can find, but I can't seem to get it to work. I went to languages in YaST and enabled Japanese as a second language, and I have tried adding japanese as a secondary keyboard layout under configure desktop-> regional and language settings. I have a little flag in the system tray that I can click to change from US to Japanese, but all that does is change what the punctuation buttons do.
View 9 Replies
View Related
Sep 3, 2009
I installed SuSe Linux. By the installation I forgot to set the key-board to German. How can I change it now? I don't think I have to re-install the Linux again, right
View 3 Replies
View Related
Mar 10, 2010
The issue I've been having is with Flash on websites; most notably, Livestream's Flash-based browser viewer, and Adult Swim's flash-based games. Clicking works perfectly fine, but the keyboard input is entirely disabled for the Flash area. Text boxes, or game controls, won't respond at all, even when everything else is still working.The only way to input any text into Flash-based text boxes is to write it somewhere else (Firefox's URL or Search bar, or in GEDIT), then copy+paste into the tect box (again, Ctrl+V won't work, only right-clicking and pasting will go through).
I've tried multiple versions of the Adobe Flash player, including the installer directly from Adobe's site, the adobe-flashplugin package in Synaptic, the flashplugin-installer package, and I believe I tried GNASH as well (although I'm not sure if that did anything).I haven't had a chance to attempt to downgrade either one yet, however, nor have I been able to test another browser.I've seen a few other issues of this sort pop up here before, but they've all either gotten no solutions, or they're a year or two old, or they're running into 64-bit-specific issues. Hopefully this is posted in the correct location, and fingers crossed someone has an answer (or better yet, a solution).
View 2 Replies
View Related
May 4, 2010
I have done a clean install of Ubuntu 10.04 on my laptop. However I don't like Evolution mail client and installed Thunderbird from the repositories. It installed fine and comes up with the wizard to fill account details in but for some reason you can't input anything from the keyboard - it seems greyed out. I tried uninstalling and re-installing but it's still the same. Everything else is fine and working.
View 9 Replies
View Related
Oct 27, 2010
how to change my input language (the way typing in accents affects the output character).
Currently I am on a Brazilian abnt keyboard and an English system (which is what I want), but I am unable to output accented characters - which I sometimes want, when I am not programming. I need something to switch around, but cannot find where to configure additional languages (not keyboards) neither where to switch.
I am on 10.04 with a gnome desktop.
View 6 Replies
View Related
Feb 10, 2011
I want to create a script to send input to an already open window from the command line. The reason that I want to do this is to automatically control a game running on a emulator screen. So, for example, I want to send commands like "up" "up" "w" "s" ..
View 4 Replies
View Related
Jun 2, 2011
I switched to pure LXDE desktop in my Ubuntu and now my Keyboard Input Methods dialog doesn't show up. When I click on the menu item nothing happens. The Preferences menu item in the keyboard icon in the panel doesn't work either.
View 9 Replies
View Related
Aug 8, 2011
Running natty. Main user account. In Ubuntu & Ubuntu Classic, both gnome, no keyboard or on-screen keyboard input. Compiz & metacity both bad. Mouse okay. Other user accounts okay. KDE okay.
Tracked problem to /home/{user}/.gconf/desktop/gnome/session/required_components/%gconf.xml. Removed file, problem goes away.
File contents:
<?xml version="1.0"?>
<gconf>
<entry name="windowmanager" mtime="1303412016" type="string">
<stringvalue>compiz</stringvalue>
</entry>
</gconf>
View 1 Replies
View Related
Oct 16, 2009
I just made a script to read out /dev/input/event3 into a file (My keyboard is identified here [ Machine is a laptop which runs on slax-atma distro ]). Then used a hexdump to convert the binary into hex. After that used a gwak script to print out the keys corresponding to each keyboard input. So now when I put this in my rc.local , It is taking down all the keys I press. Including login passwords (In short, each and every keys I press).Isn't this a big security risk, because intruder who has a physical access to my machine or has root password can put this file in rc.local and run a script to mail him all the details like my passwords, account and PIN numbers.
View 14 Replies
View Related
Oct 4, 2010
I am using gpg keys with passphrases set to connect to different jabber accounts. When I restore from hibernate I am prompted by two pinentry dialogs for these passphrases. But very often one of these dialogs that is not in focus steals keyboard input from the other dialog. Even worse, they steal keyboard input from fluxbox and other applications and I am unable to do anything until I enter it or click cancel if I do not want to input password right now. How can I forbid pinentry to steal keyboard input and to get it only if it is in focus? I am using pinentry-0.8.0 on Gentoo amd64 with USE="ncurses qt4" (/usr/bin/pinentry is a symlink pointing to pinentry-qt4).UPDATE:After some research, I found that pinentry accepts --no-global-grab option, which, according to the info page, should be used only by developers. Still unsure how to make it default: having#!/bin/zshexec /usr/bin/pinentry-qt4 --no-global-grab $@in place of /usr/bin/pinentry symlink does not work (this script is launched, but option is ignored), if I place it into /usr/local/bin it is not launched at all though I have /usr/local/bin in $PATH before /usr/bin.
View 1 Replies
View Related
Mar 31, 2010
Been a long time since I was on ubuntu again. Saw the new 9.10 version and decided I should take it up again. Only problem is, and I've come across it quite alot, (but never a working solution). That my ctrl key isn't doing anything at all, therefor making every keyboard shortcut (copy/paste/new tab in firefox...etc) not working. It's not compiz his fault, i've had the same issue before i installed it.
Also i tried switching keyboard layouts, when i key press i don't see the ctrl key light up on screen, BUT when i press shift+ctrl, it does Anyone got a clue in how to revive my loving and overused ctrl button again ?
View 1 Replies
View Related
Nov 7, 2010
I'm running a 13" white Macbook. The keyboard worked fine, until today. I logged in and half the keys didn't work, the other half were numbers not the letters they were supposed to be. This started after log in, meaning I was able to enter my password properly: The problem starts when gnome boots up.
By copy and pasting, I installed Kubuntu, where the keyboard also works properly, so this is clearly a gnome problem. I haven't ruled out malicious software, which seems like the next step: How do I verify and replace all the software (gnome) that might be corrupted?
View 2 Replies
View Related
Dec 12, 2010
I am trying to get the sounds that are played on the Casio CTK-651 keyboard from the keyboard into ubuntu or windows. I can get the signal, but no sound is played back under Windows when it's connected with an AUX-to-USB connector. When I do it with the MIDI-to-USB connector in windows and ubuntu, whenever I press a key, I get what is programmed into LMMS through connecting in a channel. I can't get the piano or guitar or whatever sound that the keyboard is making into the computer. I can upload some video to show what I'm talking about with the aux connector.
View 1 Replies
View Related
Jun 11, 2011
I run Natty 64x (new install) and have setup to use two seperate x servers and no xinerama. When I start my computer everything seems fine on both monitors but once desktop is loaded and I start an app in the second monitor, I can't type anything and the window borders are missing. If I type "DISPLAY:=0.1 metacity" the problem gets fixed but I get an error that a window manager is running already.
I have AMD/Nvidia, GeForce 8800GT.
View 5 Replies
View Related
Aug 15, 2010
While typing commands it takes more time to type.let me know on how to correct this
View 3 Replies
View Related
Jan 11, 2011
I've found that my USB mouse causes some I/O bug BIOS, but in operation system it works fine. Problem is freezing GRUB caused by fake input from the mouse. Possible decision is disabling any input for grub, but I don't know how to do it.
View 6 Replies
View Related
Sep 18, 2010
I have a very strange problem with Fedora 13 on my home PC. When booting it just hangs at random points in the boot process. When it happend the first time, I thought the PC probably is completed frozen, but then I discovered that hitting the return button got the boot process going on again, but just step by step. That means on every boot I have to keep hitting the return button until gnome starts up, that's very annoying. So for any reason the boot process seems to switch to interactive mode somehow...
I already removed the kernel boot options rhgb and quiet to see, where exactly this happens in the boot process. But as I said, it seems to be completely random. Sometimes it's when "Starting udev", sometimes, when setting up eth card, when starting atd, and so on. It's different every time.
By the way, a similar thing happens when shutting down. It can take up to half an hour until the PC really shuts down. But it's usually going faster if I just keep hitting return after issueing the shutdown command (which actually looks a bit dull). But the PC finally shuts down at some point. That's not the case when booting up. I thought, maybe there's some kind of timeout problem. But even waiting for two hours, the PC does not startup without keeping hammering the return button
View 8 Replies
View Related
Dec 18, 2009
openSuse v11.1
Linux 2.6.27.39-0.2-default x86_64
VirtualBox v3.1.0
One user account completely ignores all keyboard input. No other account demonstrates this bizarre behavior. The faulty account has had occasional keyboard difficulty but it has always been related to the Virtual Machines (VirtualBox); the hosting account always functioned correctly.
Then the ban on keyboard input. Poof! "Keyboard? What keyboard? I don't see no stinking keyboard!"
It is not the physical keyboard. Three different hardware exhibit the same fault. It is not the motherboard; two mb's show the same fault. It is only that one account. And I even took the Windows route of re-installing the OS (what a waste of time that was).
If something changed, I am not aware of it (although something must have).
View 9 Replies
View Related
Oct 6, 2010
Like in xte "str ў", but with support of all characters.
View 1 Replies
View Related