Press up key n times.

        **中文文档**

        按上方向键 n 次。
495021
def up(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.up_key, n, interval)
        self.delay(post_dl)
648437
def fn(self, i, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.function_keys[i], n, interval)
        self.delay(post_dl)
160382
def space(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.space_key, n)
        self.delay(post_dl)
1103799
def on_key_pressed(self, event):
        

        return

        # TODO

        if event.keysym == "Up":
            self.manager.set_joystick(0.0, -1.0, 0)
        elif event.keysym == "Down":
            self.manager.set_joystick(0.0, 1.0, 0)
        elif event.keysym == "Left":
            self.manager.set_joystick(-1.0, 0.0, 0)
        elif event.keysym == "Right":
            self.manager.set_joystick(1.0, 0.0, 0)

        elif event.char == " ":
            mode = self.manager.get_mode()
            if mode == self.manager.MODE_DISABLED:
                self.manager.set_mode(self.manager.MODE_OPERATOR_CONTROL)
            else:
                self.manager.set_mode(self.manager.MODE_DISABLED)
702052
function (node, callback) {
			return on.makeMultiHandle([
				on(node, 'click', callback),
				on(node, 'keyup:Enter', callback)
			]);
		}
634989
def send_keysequence_window_up(self, window, keysequence, delay=12000):
        """"""
        _libxdo.xdo_send_keysequence_window_up(
            self._xdo, window, keysequence, ctypes.c_ulong(delay))
474321
def key_press_event(self, widget, event):
        
        # get keyname or keycode and translate to ginga standard
        # keyname =
        # keycode =
        keyname = ''  # self.transkey(keyname, keycode)
        self.logger.debug("key press event, key=%s" % (keyname))
        return self.make_ui_callback('key-press', keyname)
1110841
def end(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.end_key, n, interval)
        self.delay(post_dl)
371797
def keypress(self, event):
        """"""
        try:
            self.choice.set(self.shortcuts[event.keysym])
        except KeyError:
            # key not found (probably a bug, since we intend to catch
            # only events from shortcut keys, but ignore it anyway)
            pass
1135661
def handle_keypress(screen):
    
    global selected_pid
    try:
        key = screen.getkey().upper()
    except:
        return
    if key in ("KEY_DOWN", "J"):
        move_selection()
    elif key in ("KEY_UP", "K"):
        move_selection(reverse=True)
    elif key in ("A", "+"):
        send_signal("TTIN")
        if selected_pid in gunicorns:
            gunicorns[selected_pid]["workers"] = 0
    elif key in ("W", "-"):
        if selected_pid in gunicorns:
            if gunicorns[selected_pid]["workers"] != 1:
                send_signal("TTOU")
                gunicorns[selected_pid]["workers"] = 0
    elif key in ("R",):
        if selected_pid in gunicorns:
            send_signal("HUP")
            del gunicorns[selected_pid]
            selected_pid = None
    elif key in ("T",):
        for pid in gunicorns.copy().iterkeys():
            selected_pid = pid
            send_signal("HUP")
            del gunicorns[selected_pid]
            selected_pid = None
    elif key in ("M", "-"):
        if selected_pid in gunicorns:
            send_signal("QUIT")
            del gunicorns[selected_pid]
            selected_pid = None
    elif key in ("Q",):
        raise KeyboardInterrupt
1335173
def page_up(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.page_up_key, n, interval)
        self.delay(post_dl)
731893
def on_key_press(self, event):
        """"""
        # Zooming with the keyboard.
        key = event.key
        if event.modifiers:
            return

        # Pan.
        if self.enable_keyboard_pan and key in self._arrows:
            self._pan_keyboard(key)

        # Zoom.
        if key in self._pm:
            self._zoom_keyboard(key)

        # Reset with 'R'.
        if key == 'R':
            self.reset()
679938
def press_keys(self,characters=[]):
        """"""
        for character in characters:
            self.press_key(character)
        for character in characters:
            self.release_key(character)
845699
def key_press(*args)
      options = Hash === args.last ? args.pop : {}
      keys = args
      raise ArgumentError, 'Must have at least one key argument' if keys.empty?
      begin
        key_down keys.first
        if keys.length == 1
          yield if block_given?
        else
          key_press(*(keys[1..-1] + [options]))
        end
      ensure
        key_up keys.first
      end
    end
821701
def push(h, x):
    """"""
    h.push(x)
    up(h, h.size()-1)
963533
def long_press_keycode(self, keycode, metastate=None):
        
        driver = self._current_application()
        driver.long_press_keycode(int(keycode), metastate)
62074
def send_up(self, count):
                
        for i in range(count):
            self.interface.send_key(Key.UP)