I have a strange problem in Ubuntu. I want Leonardo to send a keyboard command (Alt+Ctrl+s) to trigger suspend. (I have created a keyboard shortcut to trigger suspend with Alt+Ctrl+s which works fine with a normal keyboard.) However I cannot get this working. I manage to get the Leonardo to send keyboard presses which are displayed in a text editor. However I cannot get Leonardo to trigger a command. I suspect it has something to do with run rights of the Leonardo keyboard in Ubuntu.
The code I use is this:
Keyboard.press(KEY_LEFT_CTRL); Keyboard.press(KEY_LEFT_ALT); Keyboard.press("s"); delay(100); Keyboard.releaseAll();
I have tried this in Ubuntu 10.04, 12.04 and 13.10 with same result. I have also tried with shorter, longer and no delay.
I have tried the Arduino Keyboard Logout tutorial with same result.http://arduino.cc/en/Tutorial/KeyboardLogout The Ubuntu will not trigger Logout (CTRL+ALT+DEL). The same program works fine on a Windows 8 PC using the same Leonardo board.
I have so far spent 2 days to find a solution so far and I am now on a dead end. Please help me...