Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / KbEscape not registering
- - By boviex Date 2014-09-18 01:42 Edited 2014-09-18 02:09
I'm trying out Gosu, and it's going pretty well, except that for some reason, the Esc key is not working.

For starters, I'm running Gosu 0.8.4 x86 with Ruby 1.9.3 on Win8 x64 on a Dell Inspiron 14 7437.

I threw together a quick program that shows the button code for whatever button was pressed:

  def draw
    @background_image.draw(0,0,0)
    @font.draw("Button pressed: #{@button}", 10, 10, 1, 1.0, 1.0, 0xffffff00)
  end

  def button_down(id)
    @button = id
  end


This way, I can see that almost all the buttons have codes (letters, numbers, directions, shift, alt, ctrl, win etc.), even the numpad keys will work using the Onscreen Keyboard.

The only buttons that don't work are Esc (Onscreen Keyboard ESC also doesn't work), fn + F10-12 (even fn + F1-9 work), and the Airplane Mode key.

Does anyone know what the problem could be?
Parent - - By RunnerPack Date 2014-09-18 03:30
The only thing I can think of is Windows or some program is trapping the Esc key for some reason.

I tried your code, and I get ID 41 for Escape (Win7 x64, same Ruby/Gosu versions)

Have you tried #button_up to see if it catches the release code?

Does Fn+Esc do anything?

You could try a keyboard testing program, just to rule out hardware damage (although if that was the problem, the onscreen keyboard would still work).
Parent - - By boviex Date 2014-09-18 09:50
#button_up didn't work, Fn+Esc didn't work.
I restarted into Safe Mode, and it worked.
Then I booted normally, and it still worked.

It turns out the culprit was Adobe Photoshop. I have no idea why or how this is the case, but when I have Photoshop open, Esc stops working. I also tried Illustrator and Indesign, but they don't do anything. It's not just Gosu, either: I tried using Esc to stop a page loading in Chrome, but it doesn't work when Photoshop is open.

On further Googling, it apparently is caused by Intel HD Graphics clashing with Adobe Photoshop, and I fixed it by disabling hotkeys in the Intel HD Graphics tray icon menu. Now everything is fine!

So thanks for your help, you were absolutely right about 'some program' trapping the Esc key.
Parent - By jlnr (dev) Date 2014-09-18 13:09
o__O That sounds like one of the crazier bugs I've heard about!
Parent - By RunnerPack Date 2014-09-18 17:15
Great! Glad you figured it out. I also have Intel HD, and the hotkey function was one of the first things I disabled, merely for CPU cycle conservation reasons (I also use the old "Win9x" theme instead of Aero ;).
Up Topic Gosu / Gosu Exchange / KbEscape not registering

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill