summaryrefslogtreecommitdiff
path: root/tikzit/src/gtk/GraphEditorPanel.m
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/gtk/GraphEditorPanel.m')
-rw-r--r--tikzit/src/gtk/GraphEditorPanel.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/tikzit/src/gtk/GraphEditorPanel.m b/tikzit/src/gtk/GraphEditorPanel.m
index 553f261..a1c63a2 100644
--- a/tikzit/src/gtk/GraphEditorPanel.m
+++ b/tikzit/src/gtk/GraphEditorPanel.m
@@ -24,6 +24,8 @@
#import "TikzDocument.h"
#import "WidgetSurface.h"
+#import <gdk/gdkkeysyms.h>
+
@class GraphRenderer;
@class WidgetSurface;
@@ -176,6 +178,9 @@
}
- (void) keyPressed:(unsigned int)keyVal withMask:(InputMask)mask {
+ if (keyVal == GDK_KEY_space && !mask) {
+ return;
+ }
if (![app activateToolForKey:keyVal withMask:mask]) {
id<Tool> tool = [panel activeTool];
if ([panel hasTool] && [tool respondsToSelector:@selector(keyPressed:withMask:)]) {
@@ -185,6 +190,9 @@
}
- (void) keyReleased:(unsigned int)keyVal withMask:(InputMask)mask {
+ if (keyVal == GDK_KEY_space && !mask) {
+ [app previewDocument:[panel document]];
+ }
if (![app activateToolForKey:keyVal withMask:mask]) {
id<Tool> tool = [panel activeTool];
if ([panel hasTool] && [tool respondsToSelector:@selector(keyReleased:withMask:)]) {