summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.h
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2014-04-18 01:25:45 +1000
committerwm4 <wm4@nowhere>2014-04-17 22:52:19 +0200
commit0ab3482f73a199b2e839ad4ec0a4b21adc1e75d5 (patch)
treeb1c334c4b65298836516c314795e96c5fc30cdce /video/out/w32_common.h
parent40a072480c5d52d7daa21dd6162dfba40954f053 (diff)
downloadmpv-0ab3482f73a199b2e839ad4ec0a4b21adc1e75d5.tar.bz2
mpv-0ab3482f73a199b2e839ad4ec0a4b21adc1e75d5.tar.xz
w32_common: use ToUnicode to translate key input
This replaces translate_key_input with a solution that gives mpv more control over how keyboard input is converted to unicode. As a result: - Key up/down events are generated the same way for all keys. - Dead keys generate their base character instead of being combined with the following character. - Many Ctrl and Ctrl+Alt key combinations that were previously broken are fixed, since it's possible to discover the base keys. - AltGr doesn't produce special characters when mp_input_use_alt_gr is false. This also fixes some logic to do with detecting AltGr and adds proper UTF-16 decoding.
Diffstat (limited to 'video/out/w32_common.h')
-rw-r--r--video/out/w32_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/w32_common.h b/video/out/w32_common.h
index b8486b538a..afe3fe871a 100644
--- a/video/out/w32_common.h
+++ b/video/out/w32_common.h
@@ -55,6 +55,9 @@ struct vo_w32_state {
int mouse_x;
int mouse_y;
+
+ // UTF-16 decoding state for WM_CHAR and VK_PACKET
+ int high_surrogate;
};
struct vo;