Schematic Editor: Escape key in Add Symbol dialog does not cancel dialog

Description

When Choose Symbol dialog is opened, I expect the Cancel button at the bottom right to be mapped to the Escape key by default. However, the escape key does not do the same thing as the cancel button (it does nothing by default.)

I noticed that if I type text it immediately is placed in the filter text box and if I then hit escape, the text is deleted (so perhaps the filter text box is grabbing focus?). This is in contrast to other windows in Kicad such as the Preferences window, where pressing Escape immediately Cancels the dialog.

A separate note: using Return/Enter to do the same action as the Ok button on the bottom right of a given window also does not work consistently. In the Preferences window, pressing Enter/Return does nothing, no matter what is selected. In the Add Symbol window, pressing Enter/Return to do the same action as the Ok button only works if a component was selected since opening the window, which is different from the old behavior where opening the Add Symbol window and pressing Enter/Return immediately gave you the most recent selected symbol.

Steps to reproduce

  1. Open blank Eeschema schematic document
  2. Use shortcut A (or sidebar icon or Place > Add Symbol to open Choose Symbol dialog
  3. Attempt to use escape key to leave dialog
  4. Nothing happens

KiCad Version

Application: KiCad Schematic Editor

Version: (6.0.0-rc1-359-g7ffd43a6f4), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.41.0

Platform: macOS Big Sur Version 11.6 (Build 20G165), 64 bit, Little endian, wxMac

Build Info:
	Date: Dec  8 2021 08:51:42
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.6.0
	Curl: 7.64.1
	ngspice: 35
	Compiler: Clang 12.0.0 with C++ ABI 1002

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON