File tree 3 files changed +257
-27
lines changed
3 files changed +257
-27
lines changed Original file line number Diff line number Diff line change @@ -507,6 +507,8 @@ view: object [
507
507
focus
508
508
unfocus
509
509
scroll
510
+
511
+ control ;; used to pass control key events to a console port
510
512
]
511
513
event-keys: [
512
514
; Event types. Order dependent for C and REBOL.
@@ -533,6 +535,9 @@ view: object [
533
535
f10
534
536
f11
535
537
f12
538
+ paste-start ;; Bracketed paste turned on - https://cirw.in/blog/bracketed-paste
539
+ paste-end ;; Bracketed paste turned off
540
+ escape ;; Escape key
536
541
]
537
542
]
538
543
Original file line number Diff line number Diff line change 265
265
goto is_none ;
266
266
267
267
case SYM_KEY :
268
+ n = VAL_EVENT_DATA (value );
269
+ if (VAL_EVENT_TYPE (value ) == EVT_CONTROL ) {
270
+ arg = Get_System (SYS_VIEW , VIEW_EVENT_KEYS );
271
+ if (IS_BLOCK (arg ) && n <= (REBINT )VAL_TAIL (arg )) {
272
+ * val = * VAL_BLK_SKIP (arg , n - 1 );
273
+ break ;
274
+ }
275
+ goto is_none ;
276
+ SET_CHAR (val , VAL_EVENT_DATA (value ));
277
+ break ;
278
+ }
268
279
if (VAL_EVENT_TYPE (value ) != EVT_KEY && VAL_EVENT_TYPE (value ) != EVT_KEY_UP )
269
280
goto is_none ;
281
+ #ifdef TO_WINDOWS
270
282
n = VAL_EVENT_DATA (value ); // key-words in top 16, chars in lower 16
271
283
if (n & 0xffff0000 ) {
272
284
arg = Get_System (SYS_VIEW , VIEW_EVENT_KEYS );
277
289
}
278
290
goto is_none ;
279
291
}
292
+ #else
293
+ n = VAL_EVENT_DATA (value );
294
+ //n = Decode_UTF8_Char((REBYTE*)n, 0);
295
+ #endif
280
296
SET_CHAR (val , n );
281
297
break ;
282
298
You can’t perform that action at this time.
0 commit comments