diff --git a/data/gala.gschema.xml b/data/gala.gschema.xml index 7cea18fd0..aa0402c0f 100644 --- a/data/gala.gschema.xml +++ b/data/gala.gschema.xml @@ -144,6 +144,10 @@ Take a screenshot + + Print']]]> + Launch the interactive screenshot tool + Print']]]> Take a screenshot of a window diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 8f47ba215..8b7edb594 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -255,6 +255,7 @@ namespace Gala { display.add_keybinding ("switch-input-source-backward", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_switch_input_source); display.add_keybinding ("screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot); + display.add_keybinding ("interactive-screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot); display.add_keybinding ("window-screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot); display.add_keybinding ("area-screenshot", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot); display.add_keybinding ("screenshot-clip", keybinding_settings, Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, (Meta.KeyHandlerFunc) handle_screenshot); @@ -516,6 +517,13 @@ namespace Gala { case "screenshot": screenshot_screen.begin (); break; + case "interactive-screenshot": + try { + Process.spawn_command_line_async ("io.elementary.screenshot"); + } catch (Error e) { + warning ("Failed to launch interactive screenshot: %s", e.message); + } + break; case "area-screenshot": screenshot_area.begin (); break;