Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

DragonRuby Game Toolkit

An intuitive 2D game engine. Fast, cross-platform, tiny, hot loaded. · By DragonRuby

How to make the console work for Danish Mac keyboard

A topic by weroes created 9 days ago Views: 24 Replies: 1
Viewing posts 1 to 2

The console does not work out of the box for Danish keyboards. Here's how you make it work:

1. Follow the instructions  to embed a copy of the contrib inside your game/app folder.

2. Edit `dragonruby-game-toolkit-contrib/dragon/console.rb`. At line 215, change the  `console_toggle_key_down?` method to:

    def console_toggle_key_down? args
      return args.inputs.keyboard.key_down.less_than! ||
             args.inputs.keyboard.key_down.backtick! ||
             args.inputs.keyboard.key_down.superscript_two! ||
             args.inputs.keyboard.key_down.section_sign! ||

Now you can open the console using "the key to the left of the 1".

For some reason that key's raw value is not 10 but 60 (even though the mac app "Key Codes" reports it as 10. The plot thickens...)

(1 edit)

I filed an issue for investigating a more stable way of identifying the key.