summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa.m14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m
index 5d8e2882cf..2cc5b73bbf 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -169,6 +169,7 @@ ecore_cocoa_feed_events(void)
169 { 169 {
170 Ecore_Event_Key *ev; 170 Ecore_Event_Key *ev;
171 unsigned int i; 171 unsigned int i;
172 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
172 173
173 ev = calloc(1, sizeof (Ecore_Event_Key)); 174 ev = calloc(1, sizeof (Ecore_Event_Key));
174 if (!ev) return; 175 if (!ev) return;
@@ -178,10 +179,12 @@ ecore_cocoa_feed_events(void)
178 { 179 {
179 if (keystable[i].code == tolower([[event charactersIgnoringModifiers] characterAtIndex:0])) 180 if (keystable[i].code == tolower([[event charactersIgnoringModifiers] characterAtIndex:0]))
180 { 181 {
181 printf("Key pressed : %s\n", keystable[i].name); 182 printf("Key pressed : %s\n", keystable[i].name);
182 ev->keyname = keystable[i].name; 183 ev->keyname = keystable[i].name;
184 ev->key = keystable[i].name;
183 ev->string = keystable[i].compose; 185 ev->string = keystable[i].compose;
184 186 ev->window = window.ecore_window_data;
187 ev->event_window = ev->window;
185 ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL); 188 ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL);
186 return; 189 return;
187 } 190 }
@@ -193,6 +196,9 @@ ecore_cocoa_feed_events(void)
193 { 196 {
194 Ecore_Event_Key *ev; 197 Ecore_Event_Key *ev;
195 unsigned int i; 198 unsigned int i;
199 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
200
201 printf("Key Up\n");
196 202
197 ev = calloc(1, sizeof (Ecore_Event_Key)); 203 ev = calloc(1, sizeof (Ecore_Event_Key));
198 if (!ev) return; 204 if (!ev) return;
@@ -203,8 +209,10 @@ ecore_cocoa_feed_events(void)
203 if (keystable[i].code == tolower([[event charactersIgnoringModifiers] characterAtIndex:0])) 209 if (keystable[i].code == tolower([[event charactersIgnoringModifiers] characterAtIndex:0]))
204 { 210 {
205 ev->keyname = keystable[i].name; 211 ev->keyname = keystable[i].name;
212 ev->key = keystable[i].name;
206 ev->string = keystable[i].compose; 213 ev->string = keystable[i].compose;
207 214 ev->window = window.ecore_window_data;
215 ev->event_window = ev->window;
208 ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL); 216 ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL);
209 return; 217 return;
210 } 218 }