Commit 2c800c736f6269be09e7a9cdccd372704f1799b9
1 parent
c49bc403
Exists in
master
and in
1 other branch
Tratamento da tecla alt não funciona muito bem no windows, desativando
Showing
3 changed files
with
8 additions
and
1 deletions
Show diff stats
keyboard.c
@@ -107,6 +107,7 @@ | @@ -107,6 +107,7 @@ | ||
107 | v3270_draw_shift_status(terminal); | 107 | v3270_draw_shift_status(terminal); |
108 | } | 108 | } |
109 | 109 | ||
110 | +#ifdef KEY_FLAG_ALT | ||
110 | if(keyval_is_alt()) | 111 | if(keyval_is_alt()) |
111 | { | 112 | { |
112 | if(status) | 113 | if(status) |
@@ -115,6 +116,7 @@ | @@ -115,6 +116,7 @@ | ||
115 | terminal->keyflags &= ~KEY_FLAG_ALT; | 116 | terminal->keyflags &= ~KEY_FLAG_ALT; |
116 | v3270_draw_alt_status(terminal); | 117 | v3270_draw_alt_status(terminal); |
117 | } | 118 | } |
119 | +#endif // KEY_FLAG_ALT | ||
118 | 120 | ||
119 | } | 121 | } |
120 | 122 |
@@ -887,7 +887,9 @@ static void update_text_field(v3270 *terminal, gboolean flag, V3270_OIA_FIELD id | @@ -887,7 +887,9 @@ static void update_text_field(v3270 *terminal, gboolean flag, V3270_OIA_FIELD id | ||
887 | 887 | ||
888 | void v3270_draw_alt_status(v3270 *terminal) | 888 | void v3270_draw_alt_status(v3270 *terminal) |
889 | { | 889 | { |
890 | +#ifdef KEY_FLAG_ALT | ||
890 | update_text_field(terminal,terminal->keyflags & KEY_FLAG_ALT,V3270_OIA_ALT,'A'); | 891 | update_text_field(terminal,terminal->keyflags & KEY_FLAG_ALT,V3270_OIA_ALT,'A'); |
892 | +#endif // KEY_FLAG_ALT | ||
891 | } | 893 | } |
892 | 894 | ||
893 | void v3270_draw_ins_status(v3270 *terminal) | 895 | void v3270_draw_ins_status(v3270 *terminal) |
private.h
@@ -62,7 +62,10 @@ G_BEGIN_DECLS | @@ -62,7 +62,10 @@ G_BEGIN_DECLS | ||
62 | #define OIA_TOP_MARGIN 2 | 62 | #define OIA_TOP_MARGIN 2 |
63 | 63 | ||
64 | #define KEY_FLAG_SHIFT 0x0001 | 64 | #define KEY_FLAG_SHIFT 0x0001 |
65 | - #define KEY_FLAG_ALT 0x0002 | 65 | + |
66 | + #ifndef WIN32 | ||
67 | + #define KEY_FLAG_ALT 0x0002 | ||
68 | + #endif // !WIN32 | ||
66 | 69 | ||
67 | enum | 70 | enum |
68 | { | 71 | { |