1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 00:10:00 +02:00

Started working on keyboard shortcuts

This commit is contained in:
Mauro Balades 2024-08-08 17:44:45 +02:00
parent 4402ed8fc1
commit cc024a4528
8 changed files with 27 additions and 4 deletions

View file

@ -130,6 +130,7 @@ jobs:
source:
if: false
permissions:
contents: write
runs-on: ubuntu-latest

View file

@ -28,7 +28,7 @@ Zen is built with performance in mind, and we have optimized the browser to be a
Clone the project
```bash
git clone https://github.com/zen-browser/desktop.git --recursive
git clone https://github.com/zen-browser/desktop.git
cd desktop
```

19
docs/key-shortcuts.md Normal file
View file

@ -0,0 +1,19 @@
# Custom Keyboard Shortcuts
```json
{
"<shortcut-id>": {
"key": "<key>",
"alt": false,
"shift": false,
"ctrl": false,
"meta": false,
"keycode": 0
}
}
```
The `key` field is the key that will trigger the shortcut. The `alt`, `shift`, `ctrl`, and `meta` fields are booleans that indicate if the respective modifier key should be pressed when the shortcut is triggered.
The `keycode` field is the keycode of the key that will trigger the shortcut. This field is optional and can be used to specify the keycode of the key that will trigger the shortcut. If the `keycode` field is specified, the `key` field will be ignored.

View file

@ -1,7 +1,7 @@
# Workspaces Layout
```
```json
{
"workspaces": [
{

View file

@ -71,6 +71,7 @@ pref('zen.view.compact.hide-toolbar', false);
pref('zen.view.sidebar-expanded', false);
pref('zen.view.sidebar-expanded.show-button', true);
pref('zen.view.sidebar-expanded.max-width', 400);
pref('zen.keyboard.shortcuts', "{}");
// Pref to enable the new profiles (TODO: Check this out!)
//pref("browser.profiles.enabled", true);

@ -1 +1 @@
Subproject commit 751b71035b55c3f63b357d4623c041a01ced7c02
Subproject commit 47c43610827bbd6ce54804c402637a15ed0340f7

View file

@ -5,5 +5,6 @@ window.addEventListener("DOMContentLoaded", async () => {
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenViewSplitter.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenProfileDialogUI.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs");
}, { once: true });
</script>

View file

@ -4,4 +4,5 @@
content/browser/zen-components/ZenWorkspaces.mjs (content/zen-components/src/ZenWorkspaces.mjs)
content/browser/zen-components/ZenSidebarManager.mjs (content/zen-components/src/ZenSidebarManager.mjs)
content/browser/zen-components/ZenProfileDialogUI.mjs (content/zen-components/src/ZenProfileDialogUI.mjs)
content/browser/zen-components/ZenKeyboardShortcuts.mjs (content/zen-components/src/ZenKeyboardShortcuts.mjs)