Documentazione mIRC

on char

on char

Indice

mIRC

Commands & Identifiers

Basics

Events

Matching Tools

Data Storage

Control Structures

GUI Scripting

Sockets

Advanced Scripting

Additional Resources

Security

Other

The ON Char event is triggered when a character results from pressing one or more inside of a custom @window”).

See the note about the on keydown event, pressing control + o should result in two keypress being reported from on keydown, and control + o generates the character with code point 15, on char will trigger for that character.

This event fills the following identifiers:

**$keyval**The unicode codepoint of the character resulting from keypresses

**$keychar**The actual character resulting from keypresses

**$keyrpt**If the key is being held down/repeating

Contents

Synopsis

ON <level>:char:<@>:<codepoint,...,codepointN>:<commands>

Parameters

****The level for the event to trigger.

**<@>**The Custom Windows where this event should listen. Can be @ for all windows.

****The specific characters’ codepoints to listen for. Can specify multiple codepoints, such as:

ON *:char:@myWindow:38,42,55,78:echo -a $keyval

Example

Create an alias that launches a custom, picture window which listens for resulting character from keypresses and displays the character and if it is repeating:

alias keyDownTest {
  window -p $+ $iif($window(@myWindow),ra) @myWindow 550 300 250 105
}
ON *:char:@myWindow:*: {
  clear @myWindow
  drawtext @myWindow 1 3 3 Codepoint value: $iif($keyval,$v1,NA)
  drawtext @myWindow 1 3 25 Character: $iif($keychar,$v1,NA)
  drawtext @myWindow 1 3 47 Repeating: $keyrpt
}

The following command can now be typed into any mIRC command prompt:

/keyDownTest

Below is an image reflecting what this example will look like:

Compatibility

Added: mIRC v7.62
Added on: 29 Jul 2020

Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.

See Also

mIRC on event list

A on Action, on Active, on Agent, on Appactive B on Ban C on Char, on Chat, on Chatclose”), on Chatopen”), on Close, on Connect, on Connectfail, on Ctcpreply D on Dccserver, on Dehelp, on Deop, on Deowner, on Devoice, on Dialog, on Disconnect, on Dns E on Error, on Exit F on Filercvd, on Filesent G on GetfailH on Help, on Hotlink I on Input, on Invite J on Join K on Keydown, on Keyup, on Kick L on Load, on Logon M on Midiend, on Mode, on Mp3end N on Nick, on Nosound, on Notice, on Notify O on Op, on Open, on Owner P on Parseline, on Part, on Ping, on Playend, on PongQ on Queryclose”), on Queryopen”), on Quit R on Rawmode S on Sendfail, on Serv, on Servclose”), on Servermode, on Serverop, on Servopen”), on Signal, on Snotice,  on Sockclose, on Socklisten, on Sockopen, on Sockread, on Sockwrite, on Start T on Text, on Topic U on Udpread, on Udpwrite, on Unban, on Unload, on Unotify, on UsermodeV on Vcmd, on Voice W on Wallops, on Waveend