'Check for any key movement and update it\'s result
:param self: A TuiApSel object
:type self: TuiApSel
:param ap_info: ApDisplayInfo object
:type: ApDisplayInfo
:return: None
:rtype: None'

def key_movement(self, ap_info):

    key = ap_info.key
    pos = ap_info.pos
    max_row = ap_info.max_row
    page_number = ap_info.page_number
    if (key == curses.KEY_DOWN):
        try:
            self.access_points[pos]
        except IndexError:
            ap_info.key = 0
            ap_info.pos = pos
            ap_info.max_row = max_row
            return
        if ((pos % max_row) == 0):
            pos += 1
            page_number += 1
        else:
            pos += 1
    elif (key == curses.KEY_UP):
        if ((pos - 1) > 0):
            if (((pos - 1) % max_row) == 0):
                pos -= 1
                page_number -= 1
            else:
                pos -= 1
    ap_info.key = key
    ap_info.pos = pos
    ap_info.page_number = page_number
