Press and hold device key trigger

Please look at this article here. Maybe the macro from @Tom you can help.