show_key_bindings (Raggle::Interfaces::NcursesInterface::Key)

    # File raggle, line 2685
            def Key::show_key_bindings
              id = NcursesInterface::get_win_id('keys')

              if id == -1     # new window; will activate it either way
                keys = NcursesInterface::get_key_bindings

                # determine window width/height
                w, h = $config['w'] - 40, $config['h'] - 5
                h = keys.length + 3 if h > keys.length + 3

                # create window and add it to window list
                $wins << win = NcursesInterface::ListWindow::new({
                  'title'   => $config['msg_keys_title'],
                  'key'     => 'keys',
                  'coords'  => [20, 3, w, h],
                  'colors'  => $wins[NcursesInterface::get_win_id('item')].colors,
                })

                # build item list and draw items
                keys.each { |key, value|
                  title = ' ' + key + ' '*(w - key.length - value.length - 4) + value
                  win.items <<  { 'title' => title, 'key' => key }
                }
                win.draw_items
                NcursesInterface::set_active_win(NcursesInterface::get_win_id('keys'))
              else
                if id == $a_win # window open; toggle to closed
                  $wins[id].close(true)
                else # window open but not selected; select it
                  NcursesInterface::set_active_win(id)
                end
              end
            end