Im posting this as I found many were asking. Hope it helps.
Im using Nova and have duplicated my short press keyboard shortcuts just as in BB launcher. It will work with any other launcher. I did not bother with long press as I don't use it but in case you need then use button mapper or some similar app. Credit to the creator of Tasker.
You need Tasker and its plugin called Autoinput. I'm describing the steps for one key so all can be done similarly.
New profile in Tasker- plugin- autoinput-choose key- key condition press down.
Then add task- e.g. launch app- and press back.
Now u have a key assigned to launch that app. But to make it work only on the home screen you have to go back to the created profile and long press the autoinput part and then say add app and then add the launcher- in my case Nova. This creates a condition for the keypress to trigger only on nova home.
I am not a Tasker expert so maybe some expert can do more. This is working well for me.
Now the downside. On the home screen u press any key and it opens up google search and I could find no way to turn it off except disable the google app completely! So google related stuff is lost. If anyone finds an alternate method, do inform! But this gets the shortcuts working and I find it worthwhile.
If you want to implement long-press, you'd need to capture both, Key Down and Key Up, events and calculate the time between them to then decide whether it was a short- or long-press.
Thanks guys. The first post convinced me to use tasker, then comes the second post I still don't know what to use for automating profiles (currently experimenting with erobot) anyway thanks for the hint!