Opened 8 years ago

Closed 6 years ago

#313 closed defect (fixed)

Need to disable keyboard accelerators Shift-Home and Shift-End when focus is in a toolbar input field

Reported by: Lewis Rosenthal Owned by: Gregg Young
Priority: major Milestone: 1.4.1
Component: Lucide Core Version: 1.3.6
Keywords: Cc:

Description (last modified by Lewis Rosenthal)

When clicking in the page number dialog in the toolbar for a lengthy document, it is expected to be able to highlight the entire page number (e.g., 1200) with Shift-Home. Unfortunately, we grab that key combination and jump to the first supported document in the directory, leaving the current document.

We should disable these accelerators when in that box, so that we do not lose the current document.

Change History (10)

comment:1 by Lewis Rosenthal, 8 years ago

Description: modified (diff)

comment:2 by Lewis Rosenthal, 8 years ago

To clarify, the View | Go to page... dialog works correctly in this regard. It is just the toolbar page input box which does not.

comment:3 by Gregg Young, 8 years ago

The accelerator keys function for the entire main window. It would be probably difficult to turn them off for the toolbar. Might be able to load an acceltable for the toolbar but don't know what that would do. The other alternative is change the keys. ALT is available for these.

comment:4 by Lewis Rosenthal, 8 years ago

Summary: Need to disable keyboard accelerators Shift-Home and Shift-End when focus is in a dialogNeed to disable keyboard accelerators Shift-Home and Shift-End when focus is in a toolbar input field

I don't know that we want to change the keys, either.

lucide.cpp has this comment:

change the accel logic by first letting the focus window process WM_CHAR and only translate it to accel if not handled (this makes sure that standard keyboard shortcuts in e.g. input fields work even if we define our own accelerators from these shortcuts in the main window). Make an exception for VK_TAB since it's always eaten by the standard window procedure and therefore the accel table will never be called. Note that we do this trick only for the document window and its children: other windows such as the standard frame controls like menu etc. are known to demonstrate weird behavior (for example, the menu window seems to exit the menu mode on any WM_CHAR sent to it)

If you look at the section which follows, (near line 1311), I wonder if we could OR that to include the toolbar.

comment:5 by Gregg Young, 8 years ago

I don't thinks we can do this. I emailed Steven about it and he doesn't have a good solution. If this is important and the other related tickets are important we should change these to control shift and document it so they are not in conflict.

Version 0, edited 8 years ago by Gregg Young (next)

comment:6 by Lewis Rosenthal, 8 years ago

Are you suggesting that we assign Ctrl-Shift-Home and Ctrl-Shift-End to beginning/end of the toolbar input field, and leave Shift-Home and Shift-End for scrolling the document itself from top to bottom? If so, then ignore my last email concerning closing this as won't fix. This seems like a reasonable solution.

comment:7 by Gregg Young, 6 years ago

Milestone: 1.4.01.4.1

Ticket retargeted after milestone closed

comment:8 by Gregg Young, 6 years ago

Currently this is what these keys do

VK_HOME, CM_FILEFIRST, VIRTUALKEY, SHIFT
VK_PAGEUP, CM_FILEPREVIOUS, VIRTUALKEY, SHIFT
VK_PAGEDOWN, CM_FILENEXT, VIRTUALKEY, SHIFT
VK_END, CM_FILELAST, VIRTUALKEY, SHIFT

VK_PAGEDOWN, CM_NEXTPAGE, VIRTUALKEY, CONTROL
VK_PAGEUP, CM_PREVPAGE, VIRTUALKEY, CONTROL
VK_END, CM_LASTPAGE, VIRTUALKEY, CONTROL
VK_HOME, CM_FIRSTPAGE, VIRTUALKEY, CONTROL

Both sets work exactly as described everywhere in the main window including the page input box and the document window.

I have changed

VK_HOME, CM_FILEFIRST, VIRTUALKEY, SHIFT
VK_PAGEUP, CM_FILEPREVIOUS, VIRTUALKEY, SHIFT
VK_PAGEDOWN, CM_FILENEXT, VIRTUALKEY, SHIFT
VK_END, CM_FILELAST, VIRTUALKEY, SHIFT

to

VK_HOME, CM_FILEFIRST, VIRTUALKEY, SHIFT, CONTROL
VK_PAGEUP, CM_FILEPREVIOUS, VIRTUALKEY, SHIFT, CONTROL
VK_PAGEDOWN, CM_FILENEXT, VIRTUALKEY, SHIFT, CONTROL
VK_END, CM_FILELAST, VIRTUALKEY, SHIFT, CONTROL

This makes SHIFT+HOME work as you want in the page number box but it also changes this everywhere in the document window. Is this what you want? I don't use the hot keys so I don't care.

Note the current SHIFT combinations toggle through files. It is the Control combinations that have always done the page scrolling.

I could also make the CONTROL combinations toggle through the files and just eliminate the SHIFT combinations since Home, End, PgDn, PgUp by themselves navigate through the document.

comment:9 by Gregg Young, 6 years ago

Owner: set to Gregg Young
Status: newassigned

comment:10 by Lewis Rosenthal, 6 years ago

Resolution: fixed
Status: assignedclosed

Updated English message file to reflect new file accelerators (Ctrl+Shift+<key>). r689

Note: See TracTickets for help on using tickets.