After Ctl+Alt+Delete is pressed, continous Alt key is sent

Windows specific questions.
lassar
Posts: 287
Joined: Jan 17, 2006 1:35
Contact:

After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby lassar » Aug 12, 2018 23:45

Did Ctrl+Alt+Delete, to get to task manager, to check memory use.

Been using multikey to detect Alt key press.

Either Windows 10 has a bug after pressing Ctrl+Alt+Delete, or there is
a problem with multikey.

I tried several other alt key combinations, and can't get any continuous
alt key presses.

It only does it on Ctrl+Alt+Delete.

The work around is to press the same Alt key you used in Ctrl+Alt+Delete.

Here's the test code.

After the program is running, press Ctrl+Alt+Delete, then bring the test
window back up.

Let me know what results you get.


Code: Select all


#LANG "fblite"

ScreenRes 640, 480, 8
Do
    Dummy% = GetMouse (x%, y%, , Button%)
    ControlKey% = MultiKey(&h38)
    PRINT "ControlKey% = ";ControlKey%
Loop UNTIL Button% > 0
SLEEP 7000
End

fxm
Posts: 8175
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby fxm » Aug 13, 2018 4:59

Same behavior with Win10.
badidea
Posts: 823
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby badidea » Aug 13, 2018 17:07

Can't reproduce on linux. Whats happens on e.g. ALT+TAB?
fxm
Posts: 8175
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby fxm » Aug 13, 2018 17:44

badidea wrote:Whats happens on e.g. ALT+TAB?
No problem.
grindstone
Posts: 496
Joined: May 05, 2015 5:35
Location: Germany

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby grindstone » Aug 13, 2018 23:24

No problems here with WinXP and "Process hacker" (instead of task manager) installed.
coderJeff
Site Admin
Posts: 2614
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby coderJeff » Aug 14, 2018 21:20

Same behaviour with win7. On windows, MULTIKEY is really just a call to short GetAsyncKeyState(int vkey). There's no magic; it's as close to the WIN API as you can get. It appears that ALT key gets "stuck", if ctrl+alt+delete is followed by Task Manager, or Lock This Computer. And not a problem if ctrl+alt+delete, followed by Cancel or Switch User. I don't think there will be any fix for this behaviour.
Pierre Bellisle
Posts: 25
Joined: Dec 11, 2016 17:22

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby Pierre Bellisle » Aug 17, 2018 5:46

On my Seven machine,
if the MultiKey console window have focus,
the LeftMenu(Alt) pushed key down is detected,
the going up key release is not always detected,
probably because it occur while the ctrl-alt-del screen is active and it's a barrier to MultiKey.

If the focus is on another window,
the LeftMenu(Alt) key up seems to be always detected on my pc.
Using GetAsyncKeyState(VK_MENU) always return a good status.

Code: Select all

#Include Once "Windows.bi"
#LANG "fblite"
ScreenRes 640, 480, 8
Do
    Dummy%      = GetMouse (x%, y%, , Button%)
    'SLEEP 2
    ControlKey& = MultiKey(&h38) 'LeftMenu(Alt) 56dec 0x38: 20380001-LeftMenuDown, C0380001-LeftMenuUp
    PRINT "ControlKey& = "; ControlKey&, " GetAsyncKeyState"; GetAsyncKeyState(VK_MENU)
Loop UNTIL Button% > 0
SLEEP 2000
End
coderJeff
Site Admin
Posts: 2614
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby coderJeff » Aug 17, 2018 8:55

Thanks, Pierre. I missed seeing the real problem and your tests helped me realize that.

There are several versions of MULTIKEY.

CONSOLE uses GetAysncKeyState() - OK
FBGFX/GDI uses GetKeyboardState() - OK

FBGFX/DirectX uses IDirectInputDevice_GetDeviceState() - Not OK

I think problem appears to be only with FBGFX/DirectX version.
Which might be used if running fbc-32bit on win-64bit.
fxm
Posts: 8175
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby fxm » Aug 17, 2018 9:09

BTW:
For Windows, why not set GDI by default for fbc-32bit because it's the only one available for fbc-64bit?
St_W
Posts: 1318
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: After Ctl+Alt+Delete is pressed, continous Alt key is sent

Postby St_W » Aug 18, 2018 11:21

Probably because GDI is usually considerably slower than DirectX/OpenGL. I don't know however, how that influences the speed of FB's gfxlib2. Did anyone do some benchmarks of the different rendering backends?

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 3 guests