Author Topic: Writing a Daemon/Task  (Read 4256 times)

0 Members and 1 Guest are viewing this topic.

Offline jlnsrk

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Writing a Daemon/Task
« on: May 13, 2014, 10:34:55 am »
Hello everyboby,
I am new to this community and this question might have been asked elsewhere but I couldn't find any threads related to my problem.
So I would like to write a daemon that's active in the background and waits for certain key combinations to perform certain actions. The usage of the calculator should continue to work unimpaired. I was wondering if something like:

while(true)
{
      if(isKeyPressed(KEY_NSPIRE_R) && isKeyPressed(KEY_NSPIRE_E))
      {
            resetHandheld();
            break;
      }
      sleep(500);
}

is possible at all. If it is not, is there anyway to register a program to be launched on certain hotkey combos/shortcuts?
« Last Edit: May 13, 2014, 11:34:31 am by jlnsrk »