Autore Topic: acquisizione tasti  (Letto 7151 volte)

Offline koko

  • Gambero
  • **
  • Post: 52
    • Mostra profilo
Re: acquisizione tasti
« Risposta #30 il: 03 Ottobre 2008, 11:10:24 »
Funziona alla grande, anche per permettere all'utente di configurarsi i propri:
Codice: [Seleziona]

  DIM xbindkeys_output AS String
  DIM outputS AS String[]
  DIM hotkey AS String
  SHELL "touch /tmp/xbindkeysrc"
  SHELL "xbindkeys -k -f /tmp/xbindkeysrc" TO xbindkeys_output
  outputS = Split(xbindkeys_output, "\n", "", TRUE)
  hotkey = Trim(outputS[outputS.count - 1])
  Return hotkey

Offline guglielmofede

  • Gambero
  • **
  • Post: 64
    • Mostra profilo
Re: acquisizione tasti
« Risposta #31 il: 28 Dicembre 2009, 19:09:52 »
SALVE,

ma come si fa funzionare la rilevazione di un tasto?
Esempio io vorrei fare terminare un programmino con la pressione di ESC.

Grazie....

Offline fsurfing

  • Moderatore
  • Senatore Gambero
  • *****
  • Post: 2.484
    • Mostra profilo
Re: acquisizione tasti
« Risposta #32 il: 28 Dicembre 2009, 22:27:55 »
Codice: [Seleziona]


PUBLIC SUB Form_KeyPress()

    IF key.code = key.Esc THEN FMain.CLOSE

end


nell' esempio vado a leggere l' evento key_press di fmain, ma puoi leggere tale evento da tutti gli oggetti compatibili :)