Show an error message if opening input devices fail. Move real vs. configuration...
[enjoyable.git] / KeyInputTextView.m
index 288d903..7bda696 100644 (file)
@@ -7,6 +7,8 @@
 
 #import "KeyInputTextView.h"
 
+#import "TargetController.h"
+
 @implementation KeyInputTextView {
     int vk;
     BOOL enabled;
@@ -31,7 +33,7 @@
     return self.vk >= 0;
 }
 
-- (NSString *)stringForKeyCode:(int)keycode {
++ (NSString *)stringForKeyCode:(int)keycode {
     switch(keycode) {
         case   -1: return @"";
         case 0x7a: return @"F1";
 
 - (void)setVk:(int)key {
     vk = key;
-    descr = [self stringForKeyCode:key];
+    descr = [KeyInputTextView stringForKeyCode:key];
     [self setStringValue:descr];
     if (self.hasKey)
         [targetController keyChanged];