---
name: "minput_filter"
section: "3m17n"
platform: "linux"
package: "m17n-docs"
version: "1.8.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/minput_filter"
---

# minput\_filter(3m17n)

## NAME

minput\_filter -

## SYNOPSIS

int **minput\_filter** (**MInputContext** \* *ic*, MSymbol *key*, void \* *arg*)

## DESCRIPTION

Filter an input key. The **minput\_filter()** function filters input key **key** according to input context **ic**, and calls callback functions corresponding to **Minput\_preedit\_draw**, **Minput\_status\_draw**, and **Minput\_candidates\_draw** if the preedit text, the status, and the current candidate are changed respectively.

To make the input method commit the current preedit text (if any) and shift to the initial state, call this function with **Mnil** as **key**.

To inform the input method about the focus-out event, call this function with **Minput\_focus\_out** as **key**.

To inform the input method about the focus-in event, call this function with **Minput\_focus\_in** as **key**.

To inform the input method about the focus-move event (i.e. input spot change within the same input context), call this function with **Minput\_focus\_move** as **key**.

## RETURN VALUE

If **key** is filtered out, this function returns 1. In that case, the caller should discard the key. Otherwise, it returns 0, and the caller should handle the key, for instance, by calling the function **minput\_lookup()** with the same key. \

## COPYRIGHT

Copyright (C) 2001 Information-technology Promotion Agency (IPA)\
 Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)\
 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License  \<http://www.gnu.org/licenses/fdl.html\>.
