News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Double key-press required to exit

Started by stan, September 15, 2015, 09:19:34 PM

Previous topic - Next topic

stan

If the -k option is part of the program's filename, it waits for a key to be pressed before the window is closed. I've found that almost any key can be pressed once to close the window, but Enter requires a double press. Why is this?

Phil Harvey

Good question.  It only takes one press on Mac/Linux.  I'll assume you're on Windows, but I don't have access to a Windows machine right now so I can't try this.  Does the same thing happen when your run it from the command line with -k?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

stan

Quote from: Phil Harvey on September 15, 2015, 10:27:05 PM
Does the same thing happen when your run it from the command line with -k?
Yep, Windows 7 and same problem when run from the command line too.

Phil Harvey

I've tried this out and find the same thing.  On Windows, ExifTool uses Term::ReadKey if available to receive the keyboard input.  It seems that this is just a quirk of that package.  I can't remember why I am using this package, but probably because the standard keyboard input routine has bigger problems.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I recently updated the version of the package archiver that I use to create the Windows EXE version of ExifTool, and I think this behaviour may have changed.  Now it seems that pressing any other key doesn't quit the window, but pressing RETURN once does. :/

ExifTool 10.03 and later will be built like this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

stan

Quote from: Phil Harvey on September 25, 2015, 08:56:41 AM
I recently updated the version of the package archiver that I use to create the Windows EXE version of ExifTool, and I think this behaviour may have changed.  Now it seems that pressing any other key doesn't quit the window, but pressing RETURN once does. :/

Strange, but can't be helped I suppose. Probably the "press any key" message should now be changed accordingly?