samedi 11 juillet 2020

How I can use CTRL ,shift ,alt and other non ascii keys in c++

I was making text editor program using c++ console so I have to know the how to make some combinations like shift+s or Ctrl+c but I didn't know how to make this so go to here and I have checked this question

and i have found this code and it's working with this:

#define CTRL(c) ((c) & 037)

i know #define and bitwise and(&) but I want to know why 037 and what is this number? and if i want to #define Alt for example where i can find the required number for it?

Aucun commentaire:

Enregistrer un commentaire