Skip to content

GrabKey not working with kKeyControlMask on TGX11 #8665

@ferdymercury

Description

@ferdymercury
  • Checked for duplicates

Describe the bug

In TGMainWindow, if I call:
gVirtualX->GrabKey(GetId(), gVirtualX->KeysymToKeycode(kKey_c), kKeyControlMask, kTRUE); //capture CTRL+C
and press CTRL+C, it never reaches the HandleKey function.
If I instead call:
gVirtualX->GrabKey(GetId(), gVirtualX->KeysymToKeycode(kKey_c), kAnyModifier, kTRUE);

it reaches the HandleKey function:
event->fState = 20, event->fState & kKeyControlMask = 4

This is also the reason why some of TRootGuiBuilder shortcuts are not working.
image

Expected behavior

GrabKey works well with kKeyControlMask on TGX11.

To Reproduce

  1. new TRootGuiBuilder
  2. Press CTRL+N
  3. It does not do anything

Setup

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions