Method: TkHTML_File_Viewer#key_press

Defined in:
sample/tkextlib/tkHTML/ss.rb

#key_press(w, keysym) ⇒ Object



414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'sample/tkextlib/tkHTML/ss.rb', line 414

def key_press(w, keysym)
  return if @key_block
  @key_block = true
  Tk.after(250, proc{@key_block = false})

  if @hotkey.key?(keysym)
    process_url(@hotkey[keysym])
  end
  case keysym
  when 'Escape'
    if @fswin && @fswin.exist?
      fullscreen_off()
    else
      fullscreen()
    end
  end
end