The behavior comes from how Windows routes keyboard input and how custom layouts must describe modifier keys.
In File Explorer, Ctrl+C/Ctrl+V on a file or folder is handled at the shell level and does not depend on the character-level processing in the keyboard layout. In contrast, when renaming a file, the focus is in an edit control and copy/paste/select-all are processed using the layout’s modifier tables. If the layout does not correctly map the standard Ctrl and Shift modifiers, shortcuts like Ctrl+A/C/V will not be recognized inside edit controls.
To make these shortcuts work reliably in rename text boxes and other edit controls, the layout must:
- Expose the standard virtual keys for modifiers (VK_CONTROL, VK_SHIFT, VK_MENU) in the modifier tables.
- Map those standard virtual keys to the standard modifier bits (KBDCTRL, KBDSHIFT, KBDALT) in the
VK_TO_BITtable. - Ensure that any custom modifier virtual keys are in addition to, not instead of, the standard VKs.
If VK_CONTROL is mapped to KBDINVALID (or omitted) and only custom modifier VKs (such as VK_CUSTOM_CTRL) are mapped to KBDCTRL, edit controls that expect the standard Ctrl modifier will not see Ctrl pressed, so Ctrl+A/C/V will fail there even though shell-level shortcuts still work.
The fix is to define VK_TO_BIT so that VK_CONTROL participates in the control modifier bit, for example (conceptually):
-
{ VK_CONTROL, KBDCTRL } - Keep any custom modifier VKs also mapped to
KBDCTRL/KBDSHIFT/KBDALTas needed, but do not replace the standard VKs.
Also verify that the rest of the layout’s modifier tables (such as MODIFIERS and VK_TO_WCHAR/VK_TO_WCHAR_TABLE) are consistent with these mappings so that character-level processing in edit controls uses the correct modifier bits.
References: