tbkeys icon indicating copy to clipboard operation
tbkeys copied to clipboard

How to trigger fullscreen?

Open samtuke opened this issue 1 year ago • 3 comments

Hi there, how to trigger fullscreen with tbkeys? E.g. what cmd string to use? I searched the code and docs for both tbkeys and mousetrap but found no references so far. Not sure where I should be looking 🤔 Thanks!

samtuke avatar Jan 17 '24 19:01 samtuke

Are you asking for a full screen command like in Firefox?

In Firefox, F11 shortcut toggles the full screen.

In Thunderbird, F11 shortcut toggles the today pane.

Try these:

window.fullScreen = !window.fullScreen;
window.maximize();
window.TodayPane.toggleVisibility(window.event);
window.goDoCommand('cmd_toggleFolderPane');
window.goDoCommand('cmd_toggleMessagePane');

morat523035 avatar Jan 17 '24 21:01 morat523035

Thanks! Like this?

{
    "command+shift+f": "window.maximize()"
}

Yes I'm trying to make the fullscreen shortcut the same on thunderbird as it is on other mac apps, including firefox.

samtuke avatar Jan 17 '24 21:01 samtuke

I'm not a Mac user. The following json object works for me on Windows.

{
  "ctrl+shift+f": "window.maximize();"
}

The maximize command expands the window to the size of the desktop screen.

A maximized window occupies the entire screen space available, except for the taskbar.

Here is how to toggle between a maximized window and a normal window.

if (window.windowState !== window.STATE_MAXIMIZED) {
  window.maximize();
} else {
  window.restore();
}

Mousetrap (see supported keys) http://craig.is/killing/mice

morat523035 avatar Jan 17 '24 22:01 morat523035