Author Topic: Double key-press required to exit  (Read 2366 times)

stan

  • Jr. Member
  • **
  • Posts: 23
Double key-press required to exit
« on: September 15, 2015, 09:19:34 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16898
    • ExifTool Home Page
Re: Double key-press required to exit
« Reply #1 on: September 15, 2015, 10:27:05 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

stan

  • Jr. Member
  • **
  • Posts: 23
Re: Double key-press required to exit
« Reply #2 on: September 16, 2015, 01:55:53 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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16898
    • ExifTool Home Page
Re: Double key-press required to exit
« Reply #3 on: September 17, 2015, 09:12:45 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16898
    • ExifTool Home Page
Re: Double key-press required to exit
« Reply #4 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. :/

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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

stan

  • Jr. Member
  • **
  • Posts: 23
Re: Double key-press required to exit
« Reply #5 on: October 03, 2015, 06:57:35 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?