On this page
  1. curses.has_key
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

curses.has_key

Prev: curses.has_il | Up: curses | Next: curses.init_color
Rel: curses.assume_default_colors, curses.baudrate, curses.beep, curses.can_change_color
Ref: docs.python.org — curses.has_key
Tags: #public #python3 #stdlib #curses


Import

import curses
from curses import has_key

Signature & Overview

curses.has_key(key, /)

Return True if the current terminal type recognizes a key with that value.

Usage

import curses

# Checks whether the current terminal recognizes a KEY_* constant (e.g. KEY_UP)
assert callable(curses.has_key)

Gotchas

REPL Inspect

from curses import has_key
help(has_key)

Linked from

Related notes