diff --git a/my-listings.sty b/my-listings.sty
index 4b272258e8df052bf72143ef79ff1db088a58ec0..d590db0a5b8732a161befee88330f8d19f021047 100644
--- a/my-listings.sty
+++ b/my-listings.sty
@@ -186,13 +186,31 @@
         stringstyle=\color{lstred},
         commentstyle=\color{lstgreen},
         identifierstyle=\color{lstblue}
+      }
 }
+
+\newcommand{\lstusecolorshandouts}{
+\lstset{backgroundcolor=\color{isae@bggray}}
+
+\lstset{
+        keywordstyle=\bfseries,
+        stringstyle=,
+        commentstyle=\itshape,
+        identifierstyle=
+      }
 }
 
 \ifx@colorlst\@empty
 \relax
 \else
-\lstusecolors
+\makeatletter
+\@ifclassloaded{beamer}{%
+  \mode<presentation>{\lstusecolors}%
+  \ifx\slideshandout\undefined\mode<handout>{\lstusecolorshandouts}\else\relax\fi%
+}{%
+\lstusecolors%
+}%
+\makeatother
 \fi
 
 \endinput
\ No newline at end of file