Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Disable new page / new tab shortcuts

Post Reply
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Disable new page / new tab shortcuts

Post by thefunkyjoint »

Hello,

Is there a way to disable CTRL+T / CTRL+N shortcuts ? When i type these, a new page of Chromium is created outside of my app :?
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Disable new page / new tab shortcuts

Post by salvadordf »

Hi,

Use the TChromiumCore.OnChromeCommand event and set aResult to True if command_id is IDC_NEW_WINDOW or IDC_NEW_TAB.

There are many keyboard shortcuts in Chromium that can be intercepted with TChromiumCore.OnChromeCommand.
Just set a breakpoint in that event using MiniBrowser and read the command_id value.
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Re: Disable new page / new tab shortcuts

Post by thefunkyjoint »

Thank you ! :D
Post Reply