Orca An user setting for saying time and date.



Hi all

Thanks Willie, I made my personal keystroke, this is great
Altough a more friendly way would be better I think this will come in the
future....

So this is my user-settings.py keystroke if someone is interested I share
it:

Import time
import orca.braille
import orca.input_event
import orca.keybindings
import orca.orca
import orca.speech
from orca_i18n import _

#Here I make the process 
def sayTime (script, inputEvent=None):
   timedateString = time.strftime(_("It's") + " " + "%H" + " " + _("and") +
" " + "%M" + ". " +_("today") + " " + _("is") + "%A, %d %m
%Y",time.localtime())
   orca.speech.speak(timedateString)
   timedateString = strftime("%H:%M %a %d/%m/%Y",time.localtime())
   orca.braille.displayMessage(timedateString)

   return True

sayTimeHandler=orca.input_event.InputEventHandler(sayTime,"Speaks and
brailles time and date.")
mykeybindings=orca.keybindings.KeyBindings()
mykeybindings.add(orca.keybindings.KeyBinding("F10",1 <<
orca.orca.MODIFIER_ORCA, 1 << orca.orca.MODIFIER_ORCA,sayTimeHandler))

keyBindingsMap = {}
keyBindingsMap["default"] = mykeybindings

#end

Regards,

Javier



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]