diff --git a/README.md b/README.md index c88b33f..0a95723 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,5 @@ Then save your beautiful work by taking a screenshot. * Screenshot Tool extension: - [Screenshot Tool](https://extensions.gnome.org/extension/1112/screenshot-tool/) is a convenient extension to “create, copy, store and upload screenshots”. To use it while drawing mode is active, toggle the area selection mode thanks to the Screenshot Tool shortcut (`Super + F11` by default, see its preferences) and **hold** the `space` key when selecting the area with pointer to avoid drawing. + [Screenshot Tool](https://extensions.gnome.org/extension/1112/screenshot-tool/) is a convenient extension to “create, copy, store and upload screenshots”. In order to select a screenshoot area with your pointer while keeping the drawing in place, you need first to tell DrawOnYourScreen to ungrab the pointer (`Ctrl + Super + Alt + D`). diff --git a/extension.js b/extension.js index f0c0a48..2f42a55 100644 --- a/extension.js +++ b/extension.js @@ -351,7 +351,7 @@ var AreaManager = new Lang.Class({ } }, - toggleModal: function() { + toggleModal: function(source) { if (!this.activeArea) return; @@ -359,6 +359,8 @@ var AreaManager = new Lang.Class({ if (Main._findModal(this.activeArea) != -1) { Main.popModal(this.activeArea); + if (source && source == global.display) + this.showOsd(null, 'touchpad-disabled-symbolic', _("Keyboard and pointer released"), null, null, false); setCursor('DEFAULT'); this.activeArea.reactive = false; this.removeInternalKeybindings(); @@ -370,6 +372,8 @@ var AreaManager = new Lang.Class({ this.addInternalKeybindings(); this.activeArea.reactive = true; this.activeArea.initPointerCursor(); + if (source && source == global.display) + this.showOsd(null, 'input-touchpad-symbolic', _("Keyboard and pointer grabbed"), null, null, false); } return true; diff --git a/locale/draw-on-your-screen.pot b/locale/draw-on-your-screen.pot index 7fce215..ee4bf35 100644 --- a/locale/draw-on-your-screen.pot +++ b/locale/draw-on-your-screen.pot @@ -56,7 +56,8 @@ msgstr "" msgid "Enter/leave drawing mode" msgstr "" -msgid "Toggle modeless/modal" +# There is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po) +msgid "Grab/ungrab keyboard and pointer" msgstr "" msgid "Erase all drawings" @@ -451,6 +452,13 @@ msgstr "" msgid "Entering drawing mode" msgstr "" +# "released" as the opposite of "grabbed" +msgid "Keyboard and pointer released" +msgstr "" + +msgid "Keyboard and pointer grabbed" +msgstr "" + # %s is a key label msgid "" "Press %s to get\n" diff --git a/prefs.js b/prefs.js index 57c5388..ed47d98 100644 --- a/prefs.js +++ b/prefs.js @@ -37,7 +37,7 @@ const MARGIN = 10; var GLOBAL_KEYBINDINGS = { 'toggle-drawing': "Enter/leave drawing mode", - 'toggle-modal': "Toggle modeless/modal", + 'toggle-modal': "Grab/ungrab keyboard and pointer", 'erase-drawing': "Erase all drawings" };