Mycroft Community Forum

Is there a way to wake mycroft with a press of the keyboard instead of mycroft listening for 'hey mycroft'?

Is there a way to make it so when i press a certain key, it wakes mycroft INSTEAD of mycroft listening for ‘hey mycroft’? if not, how would i make this?

Not just by configurering Mycroft. But you can make a skill that does that.
The trick will be to send to the messagebus that it has to start listning.


Look at the picroft-google-aiy-skill for an example. It listen for press on button connected to the GPIO and when that happen it emit the message to the messagebus

Se more about messagebus here

1 Like

awesome tips thx andlo !

1 Like

This is an awesome idea. Thank you andlo, I didn’t know it was that simple to just send it via the message bus, that’s awesome!

I rewrote one of the cl tools (mycroft-say-to) and made mycroft-listen that just activates it. (I will send it up to see if I can’t merge it, or at least if it can be used somewhere else.).

On KDE you can then make a custom shortcut to run this new script. (from the “custom shortcut”)

I am struggling to figure out git issues and keyboard issues tonight, so I’ll just post the contents of script here so you can check it out.


#!/usr/bin/env bash

# Copyright 2018 Mycroft AI Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.

cd -P "$( dirname "$SOURCE" )"
DIR="$( pwd )"

# Enter the Mycroft venv
source "$DIR/../" -q

# Send a message to be spoken
output=$(python -m mycroft.messagebus.send "mycroft.mic.listen")
1 Like

Nice work, I’m very interested to see your progress on this topic. It would be very handy to be able to ‘double tap’ the command key and that wakes mycroft. I’m gonna look into how to achieve this. any ideas? @FruityWelsh

1 Like

If you find anything on a double tap shortcut please let me know. That’s not anything I’ve heard of before, but I could see the use for sure! (I guess I know of things that use it, like windows sticky keys for example). The KDE and Gnome reddits maybe a good place to ask though!

Pull request has been made.

1 Like

awesome thanks @FruityWelsh !