def normal_mode_handling(self):
        """Get and handle events for normal mode."""
        for event in SERVICES_NS.get_events():

            if event.type == QUIT:
                raise QuitAppException

            ### key down events

            elif event.type == KEYDOWN:

                ### show help text for text editor

                if event.key == K_F1:

                    open_htsl_link(
                        "nodezator://help.nodezator.pysite/"
                        "text-editor-vim-like-behavior.htsl"
                    )

                ### keys to move cursor

                elif event.key in (K_h, K_LEFT):
                    self.go_left()

                elif event.key in (K_j, K_DOWN):
                    self.go_down()

                elif event.key in (K_k, K_UP):
                    self.go_up()

                elif event.key in (K_l, K_RIGHT):
                    self.go_right()

                ### keys to enter insert mode

                elif event.key == K_i:
                    self.insert_before()
                elif event.key == K_a:
                    self.insert_after()

                elif event.key == K_o:

                    if KMOD_SHIFT & event.mod:
                        self.insert_above()

                    else:
                        self.insert_bellow()

                ### delete character under cursor
                elif event.key == K_x:
                    self.delete_under()

                ### snap cursor to different edges of
                ### text

                ## using home/end keys

                elif event.key == K_HOME:

                    if KMOD_SHIFT & event.mod:
                        self.go_to_top()

                    else:
                        self.go_to_line_start()

                elif event.key == K_END:

                    if KMOD_SHIFT & event.mod:
                        self.go_to_bottom()

                    else:
                        self.go_to_line_end()

                ## using numbers from alphanumeric portion
                ## of keyboard (just like in Vim software)

                elif event.key == K_4 and KMOD_SHIFT & event.mod:
                    self.go_to_line_end()

                elif event.key == K_0:
                    self.go_to_line_start()

                ### jump a page up or down (a page is a
                ### number of lines which fits the editing
                ### area) or snap to top or bottom of text

                elif event.key == K_PAGEUP:

                    if KMOD_SHIFT & event.mod:
                        self.go_to_top()

                    else:
                        self.jump_page_up()

                elif event.key == K_PAGEDOWN:

                    if KMOD_SHIFT & event.mod:
                        self.go_to_bottom()

                    else:
                        self.jump_page_down()

            ### mouse button up event

            elif event.type == MOUSEBUTTONUP:

                ### mouse release action

                if event.button == 1:
                    self.te.mouse_release_action(event.pos)

                ### jump many lines up or down using the
                ### mousewheel

                elif event.button == 4:
                    self.go_many_up()
                elif event.button == 5:
                    self.go_many_down()
Get and handle events for normal mode.
nodezator/textman/editor/cursor/modes/normal.py