DIV-Games-Studio
DIV-Games-Studio copied to clipboard
Keyboard shortcuts with Alt + key (Temporarily fixed)
Hi all.
I try to describe the problem with 2 examples:
-
When I have the source editor open (window focus) and I press the keyboard shortcut
alt + x
(exit), the letterx
is printed in the editor 2 times (where the insert cursor is located) before displaying the dialog box corresponding to the shortcut. -
When I have the source editor open (window focus) and I press the keyboard shortcut
alt + f
(find) the letterf
is printed in the editor 2 times (where the insert cursor is located) before displaying the dialog box corresponding to the shortcut.
The same goes for other keyboard shortcuts involving alt
, like: alt + s
(shell)
Very important: with the keyboard shortcut involving ctrl
this does not happen. For example, to search for text there are 2 keyboard shortcuts: alt + f
and ctrl + f
, only with alt + f
the bug happens.
some CMake log
-- BUILDING FOR LINUX
-- SETTING SDL to 1.2
-- Buiding LINUX 64bit
CMake Warning at CMakeLists.txt:81 (MESSAGE):
TODO - FIX RUNNER DEFINITION
-- Adding Libraries
-- CMAKE_FIND_ROOT_PATH:
-- CMAKE_SYSTEM_LIBRARY_PATH: /usr/lib/X11
-- CMAKE_INCLUDE_PATH:
-- CMAKE_SYSTEM_INCLUDE_PATH: /usr/include/X11
-- Adding SDL Library
-- Adding SDL NET
-- Adding SDL Mixer
-- Adding ZLIB
-- Adding MODE8 (VPE)
-- Adding DLL PLUGIN Support
-- Using SDL-1
-- Configuring done
-- Generating done
Versions:
- branch
master
-
div-beta-nightly-2016-10-16-ab9d3377a9
- branch:
features/cictec-fixes
I apologize in advance if I am late in replying.
Greetings.
Since I don't know if the problem is internal or external, it remains pending:
TODO:
- [x] try another window manager other than Fluxbox. Done:
i3wm
,jwm
, same problem, it is not here.
Very important: with the keyboard shortcut involving
ctrl
this does not happen. For example, to search for text there are 2 keyboard shortcuts:alt + f
andctrl + f
, only withalt + f
the bug happens.
As I said it only happens with the alt
key, so one solution for now is to ignore that same key as well.
diff --git a/src/divedit.c b/src/divedit.c
index d930c88..1dc0794 100644
--- a/src/divedit.c
+++ b/src/divedit.c
@@ -846,7 +846,7 @@ void editor() {
//ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
- if (!(shift_status&4) && ascii) {
+ if (!((shift_status&4) | (shift_status&8)) && ascii) {
if (ascii==cr) f_enter(); else if (ascii!=0x1b) {
if (modo_cursor) f_sobreescribir(); else f_insertar();
}
Would love to see a cross platform fix for this. It also seems to break differently based upon which sdl version is used.