Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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 Nov 03, 2019 Views: 270 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 https://github.com/DragonRuby/dragonruby-game-toolkit-contrib  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! ||
             args.inputs.keyboard.key_down.ordinal_indicator!
    end

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 https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/issues/12 for investigating a more stable way of identifying the key.