> Le 29 avr. 2019 à 09:59, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > [...] > unicode give you plenty of choices:
Very true, unicode is our friend. As an example, a method I use to represent some keyboard keys. The link to wiki in comments is a french-but-interesting page. Dingbats are represented in unicode too: <https://en.wikipedia.org/wiki/Dingbat> ++++++++++++++ //UI_KeyboardGetChar (keyCode_l) -> code //$0 : unicode value of the char representing the wanted keyboard key //$1 : use 4D constant for the corresponding char //example : Char(UI_KeyboardGetChar (Tab key)) -> "⇥" //http://fr.wikipedia.org/wiki/Table_des_caractères_Unicode_(2000-2FFF) //© arnaud * 27/07/2012 C_LONGINT($0) C_LONGINT($1) C_LONGINT($in_l) C_LONGINT($out_l) If (False) C_LONGINT(UI_KeyboardGetChar ;$0) C_LONGINT(UI_KeyboardGetChar ;$1) End if //_ If (Count parameters<1) $out_l:=Character code("¿") Else $in_l:=$1 //$char:=Caractère(UI_KeyboardGetChar (Tabulation)) Case of : ($in_l=Help key) $out_l:=Character code("?") : ($in_l=Escape key) $out_l:=0x238B //$out_l:=0x241B //esc in letters : ($in_l=127) //erase to the right $out_l:=0x2326 : ($in_l=Backspace key) //erase to the left $out_l:=0x232B : ($in_l=Return key) $out_l:=0x21A9 //$out_l:=0x23CE//alternate : ($in_l=Enter key) $out_l:=0x2305 : ($in_l=Tab key) $out_l:=0x21E5 : ($in_l=Left arrow key) $out_l:=0x2190 : ($in_l=Up arrow key) $out_l:=0x2191 : ($in_l=Right arrow key) $out_l:=0x2192 : ($in_l=Down arrow key) $out_l:=0x2193 : ($in_l=Home key) $out_l:=0x2196 : ($in_l=End key) $out_l:=0x2198 : ($in_l=Page up key) $out_l:=0x21DE : ($in_l=Page down key) $out_l:=0x21DF Else $out_l:=Character code("¿") //unknown End case End if $0:=$out_l //_ ++++++++++++++ -- Arnaud de Montard ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************