箭头键在Java中不起作用

时间:2018-08-10 01:50:12

标签: java awt keylistener

如果我只是说说VK_SPACE而不是VK_UP,那么当我按空格键时,它可以完成我想要的操作,但是当我按上,下,左或右键时,没有编译器错误,但是什么也没发生。

> [2018-08-10 11:40:33,463] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "<<My_Local_dev_Path>>", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "<<My_Local_dev_Path>>", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "<<My_Local_dev_Path>>", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "<<My_Local_dev_Path>>", line 35, in reraise
    raise value
  File "<<My_Local_dev_Path>>", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "<<My_Local_dev_Path>>", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "<<My_Local_dev_Path>>", line 37, in getData
    result['url']    = return_item(list(find('url', data)))
  File "<<My_Local_dev_Path>>", line 60, in find
    for result in find(key, d):
  File "<<My_Local_dev_Path>>", line 60, in find
    for result in find(key, d):
  File "<<My_Local_dev_Path>>", line 60, in find
    for result in find(key, d):
  File "<<My_Local_dev_Path>>", line 52, in find
    for k, v in dictionary.items():
AttributeError: 'str' object has no attribute 'items'

0 个答案:

没有答案