RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Keyboard issue with BasiliskII

    Scheduled Pinned Locked Moved Help and Support
    mackeyboardbasiliskemulator
    5 Posts 2 Posters 708 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yserra
      last edited by

      Hi all,
      How can I configure BasiliskII (Mac emulator) to use the right layout of my keyboard ?

      Typing numbers for instance (the upper ones, on top of letters, not the ones from the numpad) produce symbols not related to my layout. Worse, my keyboard is configured as French in Retropie and configured as French under the emulated Mac System 7.6.1, but its layout appears as a QWERTY one when I type under the emulated environment (in a text editor, for instance). And, if I turn the keyboard into a British/American layout under System 7.6.1, it becomes AZERTY (the French layout...) but, still, the numbers and other symbols are wrong.

      This behavior is supposed to be normal with BasiliskII. On other platforms (I use BasiliskII on my real Mac, too), you only have to use a file, named "keycodes" to get the layout of the host machine under the emulated environment. And I should mention my keyboard works perfectly with the expected layout under other RetroPie emulated systems (Amstrad CPC, C64, Amiga...)

      So, what I did is:
      Copy the file keycodes from the BasiliskII installation on my Mac to the /home/pi/RetroPie/roms/macintosh RetroPie directory and changed the config file /opt/retropie/configs/macintosh/basiliskii.cfg with these lines:

      keycodes true
      keycodefile /home/pi/RetroPie/roms/macintosh/keycodes
      

      But it doesn't work.
      Would you share with me a better solution?
      Many thanks !

      1 Reply Last reply Reply Quote 0
      • Y
        yserra
        last edited by yserra

        Ok, I finally found the answer myself.

        So, first, there is actually a 'keycodes' file provided with the RetroPie release of BasilikII. There is no need to manually import a new one. The path to this file is:

        /opt/retropie/emulators/basilisk/share/BasiliskII/keycodes

        For an unknown reason, opening this file from basiliskii.cfg (with the line keycodefile /opt/retropie/emulators/basilisk/share/BasiliskII/keycodes) does not work. I have no idea why.

        BUT. It works if you put it as an option from the command line that launches BasiliskII. So, if you have an international keyboard like me, edit the launching script:

        sudo nano /opt/retropie/configs/macintosh/emulators.cfg
        

        And replace the first line with this one:

        basilisk = "/opt/retropie/emulators/basilisk/bin/BasiliskII --rom /home/pi/RetroPie/roms/macintosh/mac.rom --disk /home/pi/RetroPie/roms/macintosh
        /disk.img --extfs /home/pi/RetroPie/roms/macintosh --keycodes true --keycodefile /opt/retropie/emulators/basilisk/share/BasiliskII/keycodes --conf
        ig /opt/retropie/configs/macintosh/basiliskii.cfg "
        

        And, tadam! French/German, now you have a working Azerty/Qwertz layout under the emulated Mac System 7.

        BuZzB 1 Reply Last reply Reply Quote 1
        • BuZzB
          BuZz administrators @yserra
          last edited by BuZz

          @yserra btw the line will be replaced upgrading. You can protect against this by adding a new line with the key "basilisk-mine = " ... etc" and switching the default value to that (or switch via runcommand). Call the name anything you like so long as it's unique from the default name.

          Is your change specific to certain layouts, or should this be a default - it sounded like you thought this file should have been loaded by default but wasn't. That could be something we can fix.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators
            last edited by

            Oh and thanks for the info btw. I updated previous post btw with a few corrections.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            1 Reply Last reply Reply Quote 0
            • Y
              yserra
              last edited by

              Many thanks for your advice @BuZz. I modified the startup script as you mentioned and it still works.

              My understanding is that BasiliskII should ever load the 'keycodes' file so the host keyboard layout (the one configured in Raspbian/RetroPie, here) is taken into account, whatever international layout it is. Without the 'keycodes' file, only US-layout would be recognized and typing from another host keyboard layout (i.e French AZERTY, German QWERTZ...) under Basilisk would produce weird result. If I understand well, the keycodes file contains the USB keycode for any environment BasiliskII has been built for (so, the Linux framebuffer, here).

              By the way, loading or not this keycodes files every time BasiliskII starts is not necessarily the most important point. With your permission, I would rather suggest that there is something to fix somewhere, since BasiliskII doesn't open this file when it is told to do so from its basiliskii.cfg config file.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.