Ctrl + Alt + b is not cross system / keyboard language compatible

Issue #5 resolved
Luca Bösch created an issue

The key combination Ctrl + Alt + b does not work cross operation systems.
Or is it keyboard languages and operation systems?

In either case, Ctrl + Alt + b does not toggle full screen on a Mac system, I think.

Comments (19)

  1. Neill Magill

    Hi Luca,

    I have just had a college with a Mac test the keyboard functionality on a Mac and it works using:

    Control + Option + b

  2. Luca Bösch reporter

    Thanks for testing, Neill.
    It must be a keyboard language issue then. I’ve got German (Switzerland) in my place and it seems to trigger a ∫ sign.
    I try to switch to en-GB here and cross check here, then.

  3. Neill Magill

    Do you have a QWERTY keyboard?

    I wonder if the KeyboardEvent.key property maybe returning values based based on that (even though its documentation does not seem to be warning about that it is not layout independent)

  4. Neill Magill

    It looks like other people here cannot get the key combination working either.

    So it worked on:

    • MacBook pro circa 2010 running High Sierrra

    It didn’t work on:

    • Macbook Pro (2013 model)

    But it seems as though it was opening the bookmarks tab, on those devices.

  5. Luca Bösch reporter

    I’ve got a 2014 MacBook Pro running Sierra!
    Glad you could reproduce the reported issue.
    It’s not a matter of life and death by the way, just to say.

    Best,
    Luca

  6. Neill Magill

    I’m guessing since we selected that key combination it has come to mean something on a Mac that it did not previously…

  7. Neill Magill

    I guess we need to work out a combination that will work well across a Mac and PC, do you have any suggestions for a Mac?

  8. Luca Bösch reporter

    Hhhm, not so sure.
    It could also be, that a Moodle System configurable Key combination could bring you luck. I know of the local/commander plugin which allows for customizable key combinations and allows even multiple ones. https://github.com/MFreakNL/moodle-local_commander/issues/6 but that is one key only, no Alt, no Option, no Control key.
    Just as food for thought.
    If you delegate this to the admins to find the combination that work, then you’re fine and out of responsability.

  9. Neill Magill

    And just as some additional debugging if you can it might be interesting to know the results of using the following code in the browser console from a Moodle page:

    $(document).keydown(function(event) {
        if (event.ctrlKey === true && event.altKey === true && event.key !== 'Alt' && event.key !== 'Control') {
            console.log('Pressed key: ' + event.key);
        }
    });
    

    If you are on a the page after that and use Ctrl + Alt (or Ctrl + Option) and hit another key it should output the value of the key you pressed.

    Knowing the output for the with a b happens, or shows another character would be good.

  10. Neill Magill

    I have been playing a little more and the key combination will not work if cap lock is turned on right now.

  11. Neill Magill

    I have a solution that will allow an admin to select the key combination for their site, with it defaulting to Ctrl + Alt + b, it will be coming to the repository soon.

  12. Neill Magill

    The Moodle 3.10 version of the plugin now includes the ability for an administrator to configure the toggle keys, it can be any letter that includes at least one modifier key, i.e.

    1. alt
    2. ctrl
    3. meta (e.g. Windows key)
    4. shift

    The change is currently on the master branch. I will put it up into the plugin directory after we have finished out upgrade testing.

  13. Log in to comment