Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcuts with Alt + key (Temporarily fixed) #37

Open
1 task done
daltomi opened this issue Sep 4, 2022 · 2 comments
Open
1 task done

Keyboard shortcuts with Alt + key (Temporarily fixed) #37

daltomi opened this issue Sep 4, 2022 · 2 comments

Comments

@daltomi
Copy link

daltomi commented Sep 4, 2022

Hi all.

I try to describe the problem with 2 examples:

  1. When I have the source editor open (window focus) and I press the keyboard shortcut alt + x (exit), the letter x is printed in the editor 2 times (where the insert cursor is located) before displaying the dialog box corresponding to the shortcut.

  2. When I have the source editor open (window focus) and I press the keyboard shortcut alt + f (find) the letter f is printed in the editor 2 times (where the insert cursor is located) before displaying the dialog box corresponding to the shortcut.
    1662301040

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

Note: Linux x64 (ArchLinux), SDL 1.2

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:

  • try another window manager other than Fluxbox. Done: i3wm, jwm, same problem, it is not here.
@daltomi daltomi changed the title Keyboard shortcuts with Alt + key Keyboard shortcuts with Alt + key (Temporarily fixed) Apr 1, 2023
@daltomi
Copy link
Author

daltomi commented Apr 1, 2023

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.

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();
     }

@MikeDX
Copy link
Collaborator

MikeDX commented Apr 1, 2023

Would love to see a cross platform fix for this. It also seems to break differently based upon which sdl version is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants