@@ -123,26 +123,43 @@ TEST_CASE("[InputEventKey] Key correctly converts itself to text") {
123123
124124 // Key is None WITH a physical key AND modifiers.
125125 none_key.set_physical_keycode (Key::ENTER);
126- CHECK (none_key.as_text () == " Ctrl+Enter - Physical" );
126+ CHECK (none_key.as_text () == " Ctrl+Enter" );
127+
128+ none_key.set_physical_keycode (Key::W);
129+ CHECK (none_key.as_text () == " Ctrl+W - Physical" );
127130
128131 // Key is None WITH a physical key AND multiple modifiers, checks for correct ordering.
132+ none_key.set_physical_keycode (Key::ENTER);
129133 none_key.set_alt_pressed (true );
130134 none_key.set_shift_pressed (true );
131135#ifdef MACOS_ENABLED
132- CHECK (none_key.as_text () != " Ctrl+Shift+Option+Enter - Physical" );
133- CHECK (none_key.as_text () == " Ctrl+Option+Shift+Enter - Physical" );
136+ CHECK (none_key.as_text () != " Ctrl+Shift+Option+Enter" );
137+ CHECK (none_key.as_text () == " Ctrl+Option+Shift+Enter" );
138+ #else
139+ CHECK (none_key.as_text () != " Ctrl+Shift+Alt+Enter" );
140+ CHECK (none_key.as_text () == " Ctrl+Alt+Shift+Enter" );
141+ #endif
142+ none_key.set_physical_keycode (Key::W);
143+ #ifdef MACOS_ENABLED
144+ CHECK (none_key.as_text () != " Ctrl+Shift+Option+W - Physical" );
145+ CHECK (none_key.as_text () == " Ctrl+Option+Shift+W - Physical" );
134146#else
135- CHECK (none_key.as_text () != " Ctrl+Shift+Alt+Enter - Physical" );
136- CHECK (none_key.as_text () == " Ctrl+Alt+Shift+Enter - Physical" );
147+ CHECK (none_key.as_text () != " Ctrl+Shift+Alt+W - Physical" );
148+ CHECK (none_key.as_text () == " Ctrl+Alt+Shift+W - Physical" );
137149#endif
138150
139151 InputEventKey none_key2;
140152
141153 // Key is None without modifiers with a physical key.
154+ none_key2.set_keycode (Key::NONE);
155+ none_key2.set_physical_keycode (Key::W);
156+
157+ CHECK (none_key2.as_text () == " W - Physical" );
158+
142159 none_key2.set_keycode (Key::NONE);
143160 none_key2.set_physical_keycode (Key::ENTER);
144161
145- CHECK (none_key2.as_text () == " Enter - Physical " );
162+ CHECK (none_key2.as_text () == " Enter" );
146163
147164 InputEventKey key;
148165
0 commit comments