Re: [RFC] [PATCH] Allow user defined key to interupt sleep command

2013-09-16 Thread Colin Watson
On Mon, Sep 16, 2013 at 06:46:47PM +0800, Yang Bai wrote: > On Mon, Sep 16, 2013 at 5:26 PM, Colin Watson wrote: > > On Mon, Sep 16, 2013 at 04:49:46PM +0800, Yang Bai wrote: > >> At now, sleep --interruptible 3 can only be interupted by ESC key. > >> With this patch, we can special a key such as

Re: [RFC] [PATCH] Allow user defined key to interupt sleep command

2013-09-16 Thread Yang Bai
Hi Colin, Thanks for your review. Please see my inline comments. On Mon, Sep 16, 2013 at 5:26 PM, Colin Watson wrote: > On Mon, Sep 16, 2013 at 04:49:46PM +0800, Yang Bai wrote: >> At now, sleep --interruptible 3 can only be interupted by ESC key. >> With this patch, we can special a key such as

Re: [RFC] [PATCH] Allow user defined key to interupt sleep command

2013-09-16 Thread Colin Watson
On Mon, Sep 16, 2013 at 04:49:46PM +0800, Yang Bai wrote: > At now, sleep --interruptible 3 can only be interupted by ESC key. > With this patch, we can special a key such as sleep --interruptible > f10 3 and we can type F10 to interrupt the sleep. This can work as a > hotkey handler. This patch s

[RFC] [PATCH] Allow user defined key to interupt sleep command

2013-09-16 Thread Yang Bai
Hi all, At now, sleep --interruptible 3 can only be interupted by ESC key. With this patch, we can special a key such as sleep --interruptible f10 3 and we can type F10 to interrupt the sleep. This can work as a hotkey handler. Modified some code borrowed from [PATCH] Allow hotkeys to interrupt hi