[GrafX2] #99: Strange set key behavior

5 views
Skip to first unread message

GrafX2

unread,
Jan 31, 2019, 8:18:26 AM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
-------------------------+------------------------
Reporter: HoraK-FDF@… | Owner: pulkomandy
Type: defect | Status: new
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Keywords: |
-------------------------+------------------------
Hi,

the version I'm using is grafx2-win32-2.6.2475-win32.zip from the download
page.

If i try to set keys it displays a wrong key but the desired key works as
intended for example:

if press Up it shows Shift+PgDn, that kind of behavior is true for many
other keys:
Left -> Alt+Shift+' '
Right -> Alt+Shift+PgDn

... greetings HoraK-FDF

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99>
GrafX2 <http://pulkomandy.tk/projects/GrafX2>
The ultimate 256-color painting program

GrafX2

unread,
Jan 31, 2019, 10:07:36 AM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+------------------------
Reporter: HoraK-FDF@… | Owner: pulkomandy
Type: defect | Status: new
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+------------------------

Comment (by Thomas Bernard):

thanks for the report, I will check that.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:1>

GrafX2

unread,
Jan 31, 2019, 11:46:49 AM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------
Changes (by Thomas Bernard):

* owner: pulkomandy => Thomas Bernard
* status: new => accepted


--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:2>

GrafX2

unread,
Jan 31, 2019, 1:32:03 PM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by HoraK-FDF@…):

It does not happen with grafx2-sdl-2.6.2475-win32.zip

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:3>

GrafX2

unread,
Jan 31, 2019, 5:13:16 PM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by Thomas Bernard):

OK I think that is because we use MOD_SHIFT/MOD_ALT_/MOD_CTRL which are
defined in {{{WinUser.h}}} :

{{{
#define MOD_ALT 0x0001
#define MOD_CONTROL 0x0002
#define MOD_SHIFT 0x0004
}}}

it conflicts with our own definitions in {{{global.h}}}

Up has win32 keycode 0x26 which is 0x4 (SHIFT) + 0x22 (Page Down)

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:4>

GrafX2

unread,
Jan 31, 2019, 5:57:09 PM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by Thomas Bernard):

https://gitlab.com/GrafX2/grafX2/merge_requests/168

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:5>

GrafX2

unread,
Jan 31, 2019, 7:20:53 PM1/31/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by Thomas Bernard):

safe and long term solution is to rename MOD_SHIFT, etc. to a private name
such as GFX2_MOD_SHIFT, etc.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:6>

GrafX2

unread,
Feb 1, 2019, 1:04:40 PM2/1/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by yrizoud@…):

<windows.h> pollutes the global namespace a lot, I think it would be
better to minimize the number of .C files that include it.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:7>

GrafX2

unread,
Feb 1, 2019, 2:06:07 PM2/1/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by Thomas Bernard):

@yrizoud: here is what I propose to do :
1. merge https://gitlab.com/GrafX2/grafX2/merge_requests/168 as a quick
fix for v2.6

2. wait v2.7wip to apply the patch
https://gitlab.com/miniupnp/grafX2/commit/a29e2c0bda7a60fcd85091c722ef5f181d567de3
which rename MOD_* to GFX2_MOD_* so there is no more clash

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:8>

GrafX2

unread,
Feb 1, 2019, 4:59:55 PM2/1/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by yrizoud@…):

Yes I agree with both changes as a short- and long-term fix for these
modifiers. But I still think that (microsoft's) windows.h is going to
collide with more stuff in the future.
The current coding conventions helps avoid a lot of conflicts (T_Struct
for most structs, capitalized Function() etc. but (from a quick look at MS
docs in search of examples) you can easily collide common names such as
#define INPUT (reserved by a typdefed struct) or if you try to call a
parameter or local variable "mouse_event" (reserved by an obsolete
function)

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:9>

GrafX2

unread,
Feb 1, 2019, 5:08:59 PM2/1/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by PulkoMandy):

For Haiku I moved all the platform specific code to haiku.cpp as it is
written in C++.
I would recommend doing the same for other platform specific parts: define
our API, and move its implementation to a specific file. This would avoid
including windows.h anywhere outside this specific file.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:10>

GrafX2

unread,
Feb 2, 2019, 10:28:26 AM2/2/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by Thomas Bernard):

I have created a specific ticket for <windows.h> name pollution :
http://pulkomandy.tk/projects/GrafX2/ticket/105

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:11>

GrafX2

unread,
Feb 4, 2019, 3:50:00 AM2/4/19
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: accepted
Priority: major | Milestone:
Component: GrafX2 | Version: 2.6
Resolution: | Keywords:
--------------------------+----------------------------

Comment (by Thomas Bernard):

@HoraK-FDF it should be fixed with 2.6.2538
https://gitlab.com/GrafX2/grafX2/-/jobs/155478705/artifacts/raw/grafx2-win32-2.6.2538-win32.zip
https://gitlab.com/GrafX2/grafX2/-/jobs/155478705/artifacts/raw/install/grafx2-win32-2.6.2538.win32.exe

I'm leaving the ticket open for not forgetting about a more long term
solution.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:12>

GrafX2

unread,
Nov 30, 2020, 6:08:56 PM11/30/20
to gra...@googlegroups.com
#99: Strange set key behavior
--------------------------+----------------------------
Reporter: HoraK-FDF@… | Owner: Thomas Bernard
Type: defect | Status: closed
Priority: major | Milestone: 2.8
Component: GrafX2 | Version: 2.6
Resolution: fixed | Keywords:
--------------------------+----------------------------
Changes (by Thomas Bernard):

* status: accepted => closed
* resolution: => fixed


Comment:

I think we can close now, #105 is closed.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/99#comment:14>
Reply all
Reply to author
Forward
0 new messages